perm filename TEXTEX.TEX[WEB,ALS]5 blob sn#721369 filedate 1983-08-04 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00018 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00003 00002	% This is the "TEX Beginner's Manual" source text
C00005 00003
C00012 00004	\pageno=-1
C00018 00005	\pageno=1
C00047 00006	{\bf Boxing with Glue}
C00053 00007	\noindent {\bf An Example}
C00055 00008	The first page of the source file defines some \css\/\ and contains: \medskip
C00059 00009	We first note that
C00071 00010	{\bf Understanding Error Messages}
C00076 00011	{\bf The Six Modes}
C00081 00012	{\bf Making Tables}
C00110 00013	{\bf The Fixed-Column-Width `\\settab' Method}
C00127 00014	{\bf Typing Mathematical Formulas}
C00144 00015	Before considering matrices and other uses of large delimiters, let us
C00179 00016	\centerline{Appendices not yet written}
C00191 00017	%This is the title page, put last so as to permit the nopagenumbers command
C00193 00018	\beginchapter Appendix B. Basic\\Control\\Sequences
C00200 ENDMK
C⊗;
% This is the "TEX Beginner's Manual" source text

\font\ninerm=cmr9  \font\eightrm=cmr8  \font\sixrm=cmr6   \font\mc=cmcsc
\font\seal=stan70

\def\TEX{T\kern-.1667em\lower.5ex\hbox{E}\kern-.125em X}
\def\TeX{T\kern-.1667em\lower.5ex\hbox{E}\kern-.125em X}
\def\BoX{B\hbox{\hskip-.05em\raise.35ex\hbox{o}\hskip-.1667em X}}
\def\GLue{GL\hbox{\hskip-.1667em\raise.54ex\hbox{ue}}}

\magnification=1200

\def\DVI{{\mc DVI}}
\def\undertext#1{$\underline{\hbox{#1}}$}
\def\\{{\tt \char'134}}
\def\up{{\sy \char'42}}
\def\down{{\sy \char'43}}
\def\caret{{\char'17}}
% \def\&{{\char'46}}
\parskip 10pt plus 1pt
\parindent 0pt
%\count0 0

\def\cs{{\sl control sequence}} 
\def\css{{\sl control sequences}} 
\def\Css{{\sl Control sequences}}

\def\begintt{$$\let\par=\endgraf \ttverbatim
  \catcode`\|=0 \rightskip-5pc \ttfinish}
{\catcode`\|=0 |catcode`|\=12 % | is temporary escape character
  |obeylines % end of line is active
  |gdef|ttfinish#1↑↑M#2\endtt{|vbox{#2}|endgroup$$}}
\pageno=-1
\null\vfil
\centerline {\bf A Beginner's Preface}

\vfil
The beginner can easily be confused by the different
versions of \TeX82 that seem to exist on different computers
and by the conflicting claims for different {\sl Macro Packages\/}
that are supposed to making \TeX\ `user friendly'.
This preface attempts to clarify this situation.

In the first place, there is only one official version of \TeX82 and users
are specifically cautioned not to make any changes to the basic program
itself.  A `{\sl change file\/}' mechanism is provided to allow
the program to be compiled differently as dictated by the hardware and
system software constraints that exist at any particular computer
installation but these changes should not modify \TeX's formatting 
capabilities.

It is customary, and indeed desirable, to supply \TeX\ with a fairly large
amount of additional information, either in the form of a separate
input file or as information that is preloaded with \TeX\ so that
it becomes available automatically when the \TeX\ program is used.  Such
files are usually called {\sl macro packages\/} and you, as a user, may
have to concern yourself with the number and kinds of {\sl macro
packages\/} that are available at your installation.

{\sl Macro packages\/} are used to supply \TeX\ with  several quite different
kinds of information, much of it being fairly standard and of no immediate concern.
{\sl Macro packages\/} often assign values to a fair number of the approximately
eighty \TeX\ {\sl primitives\/} that can be so preassigned and you may wish
to assign different values to these.
Of major concern are the fairly large number of {\sl
control sequences\/} that are predefined.  These {\sl control
sequences\/} attach names to certain logical combinations of selected {\sl
primitives\/} (and of other {\sl control sequences\/}) that together perform
frequently-used formatting function. The availability of these predefined sequences
can make your task very much easier when you wish to do the
specific things for which they were designed.

This manual is written on the assumption that you will be using the {\tt
PLAIN.TEX} {\sl macro package}.  This package simplifies many formatting
tasks without interfering with the separate use of any of \TeX's {\sl
primitives\/}.  Having mastered plain \TeX\ to the extent that it is
explained in this manual, you may later want to define some additional
{\sl control sequences\/} that will help you in specifying the
formatting conventions that you employ.

Some {\sl macro packages} are written from quite a different point of view
from that used for plain \TeX,
where the aim is make certain global formatting conventions very easy to
use at the expense (and sometimes with the deliberate intent) of making it more
difficult for other formatting conventions to be specified.  Some of
these packages actualy redefine terms that \TeX\ uses for {\sl primitives\/}
so that these {\sl primitives} can no longer be called directly.
If one of these packages completely meets your needs then you should
use it, but beware.

One final word---there is a certain amount of circularity in the language
used in this manual. If you do not understand everything the first time
through, plow straight ahead until you bog down and then start all
over again at the beginning. You will be surprised how much clearer
everything will be on the second reading.

\eject

\pageno=1
\centerline{\bf First Grade \TeX} 
\vskip .1in 
\centerline{\bf A Beginner's \TeX\ Manual}

{\bf Introduction}

This is an introductory ready-reference \TeX82 manual for the beginner
who would like to do First Grade \TeX\ work.
Only the most basic features of the \TeX\
system are discussed in detail.  Other features are summarized in
appendices and references are given to the more complete documentation
available elsewhere.

\TeX\ is a computerized typesetting system.  As \TeX\ is normally used,
the original text is typed (into an input file) very much as it would be
typed for submission to an old-fashioned printer except that this input file
must now contain all of the instructions that are needed to describe the
desired format for the printed output.  Given such a description, still in
rather general terms, the \TeX\ compiler is able to specify in precise
detail the font (i.e., the size and kind of typeface)
and the location for each character that is to be printed.
Your final output can meet the very best publishing standards.

Defining book quality text is not an easy task.  While the \TeX\ system
takes care of many of the tedious details, the wealth of facilities that
\TeX\ provides can be very confusing to the beginner and sometimes even to
the experienced user.  These facilities include the handling of such
matters as: 1)~ligature replacements (for example, fi for f{i}),
2)~kerning (different spacings between certain letter pairs), 3)~automatic
hyphenation, 4)~line justification, 5)~centering, 6)~flushing right or
left, 7)~tabular aligning, 8)~the formatting of complicated mathematical
expressions, 9)~section and page numbering, 10)~the introduction of
running heads, 11)~the numbering and placing of footnotes, and 12) the
preparation of a table of contents and an index, to name but a few.

It will be assumed that the reader is already acquainted with the use of a
computer and with at least one text editor that can be used while typing
the \TeX\ source file.  One minor warning at this point; Do not use an
editor that requires or leaves its own special formatting marks (line numbers,
word processing commands, etc.)
in the
file that it produces, unless your version of \TeX\ has been specially fixed to 
tolerate them. Such marks will be assumed to be a part of the text
by \TeX . The text in the source file should be broken up into
reasonably short lines.  \TeX\ will ignore, 1)~the way you break your
paragraphs into lines, 2)~extra
spaces between words, and 3)~extra blank lines between paragraphs,
although it does accept one or more blank lines as indicating a paragraph break.

\TeX\ is usually preloaded with
one or more special files that define many very useful commands.  This manual
assumes that you will be using a basic file called {\tt PLAIN.TEX}, and \TeX\ when
so loaded will be refered to as {\sl plain} \TeX .
The details as to how one actually types the source information, how this
is saved as a file on the system, how one evokes the \TeX\ compiler, and
how one instructs the computer system to print the final document, these
features are, of course, highly system dependent.  Typical protocols for
some typical operating systems are listed in Appendix S.

\noindent {\bf Toward Book Quality}

Book quality text differs from ordinary typing in a number of simple but
far from trivial ways.  In the first place, a distinction is made between
the upper case `O'~and~a~`0' and between the lower case `l'~and~a~`1',
then there is a distinction between hyphens, dashes,and the minus sign.
Also, your terminal should contain two varieties of `single' quotes and
when you want a ``double'' quote you simply type two of the appropriate
single quotes and \TeX\ will space these correctly, as shown below.

$$\vbox{\halign {\hfil #\hfil\quad &\hfil #\hfil\quad &\hfil #\hfil\quad&
\hfil #\hfil\quad &\hfil #\hfil\quad&\hfil #\hfil\quad \cr
Name&Hyphen&En-dash&Em-dash&Minus sign&Double quotes\cr
To get&-&--&---&$-$&``text''\cr
You type&\tt -&\tt -{}-&\tt -{}-{}-{}&$\$${\tt -}$\$$&\tt `{}`text'{}'\cr}}$$

A word about hyphenation---\TeX\ can usually be depended upon to use
hyphens correctly (when this is necessary to achieve right justification) and
to avoid excessive hyphenation (by increasing or slightly decreasing
the inter-word spacings within pre-assigned limits).
There are exceptions,
\TeX\ will not normally hyphenate words beginning with a Capital letter
(so as not to hyphenate names), and there are words like pres-ent and
pre-sent where the positioning of a hyphen depends upon how the word is
used.  When \TeX\ either refuses to hyphenate or makes a mistake, you can
gain hyphenation control over the word in question by inserting one or
more {\sl discretionary hyphens\/} at acceptable locations, using the {\sl
control sequence\/} `{\tt \\-}'. These will be ignored when not needed and
they will print as normal hyphens when needed.

\TeX\ provides for the automatic substitution of ligatures in most fonts,
replacing f{f} by ff, f{i} by fi, and f{l} by fl, unless this is
specifically disallowed, for example, by typing either {\tt f$\{$f$\}$} or
{\tt f$\{\}$f} to get f{}f.

A nice feature of \TeX , when used with {\tt PLAIN.TEX}, is the ease with
which special accents and a few special letters may be produced.

$$\vbox{\halign{\indent \hfil #\hfil\quad &\hfil #\hfil\quad &\hfil
#\hfil\quad& \hfil #\hfil\quad &\hfil #\hfil\quad&\hfil #\hfil\quad& \hfil
#\hfil\quad &\hfil #\hfil\quad&\hfil #\hfil\quad \cr
Name&grave´&``hat''¨aut&tilde&``bar''&dot\cr
To get&\`o&\'o&\↑o&\"o&\~o&\=o&\.o\cr
You type&{\tt \\`o}&{\tt \\'o}&{\tt \\\↑{}o}&{\tt \\"o}&{\tt
\\\~{}o}&{\tt \\=o}&{\tt \\.o}\cr
\cr
Name&check&breve&long&tie-after¸la&bar-under&dot-under\cr
To get&\v o&\u o&\H o&\t o&\c o&\b o&\d o\cr
You type&{\tt \\v o}&{\tt \\u o}&{\tt \\H o}&{\tt \\t o}&{\tt
\\c o}&{\tt \\b o}&{\tt \\d o}\cr
\cr
To get&\oe ,\OE&\ae ,\AE&\aa ,\AA&\o ,\O&\l ,\L&\ss\cr
You type&{\tt \\oe,\\OE}&{\tt \\ae,\\AE}&{\tt \\aa,\\AA}&{\tt
\\o,\\O}&{\tt \\l,\\L}&{\tt \\ss}\cr}}$$

These special symbols and characters all work equally well in {\tt \\rm},
{\tt \\sl}, {\tt \\it},
and {\tt \\bf} fonts (to be explained under Fonts below).
A few do not work in the {\tt \\tt} font
which simulates a typewriter with fixed-width characters.

There are also a large number of mainly mathematical characters that are
available in the {\sl mathematics mode\/}---but more on this later.

\noindent{\bf Special Symbols}

Plain \TeX82 assigns special meanings to ten infrequently used but
otherwise quite common symbols.  Should you wish these symbols to appear
as text in your final document they must be typed in a special way as
noted below.  Note, in particular, that the {\sl escape character},
`{\tt \\}',
is not to be confused with the ESC key that appears on many key boards.

$$\vbox{\lineskip0pt
\tabskip0pt plus1fil\halign to \hsize{\tabskip0pt\strut
\tt \hfil #\hfil\quad &\tt \hfil #\hfil\quad &
\vtop{\hsize=26em\hangindent1em\strut#\strut}\tabskip0pt plus1fil\cr
\rm Symbol&\rm As text&\qquad\quad Special \TeX\ meaning when used directly\cr
\noalign{\smallskip}
\\&\\{}\\& Escape character used to
indicate the start of a \TeX\ {\sl control sequence}\cr
$\{$ and $\}$& $\$$\\$\{$$\$$ and $\$$\\$\}$$\$$&
Grouping symbols, to indicate range of action of a {\sl control sequence} to the enclosed text\cr
\$&\\{}\$& Used to initiate and terminate portion of the text that is to be in Mathematics Mode\cr
\&&\\{}\&& Alignment tab, used to delineate fields within a table \cr
\#&\\{}\#& Parameter, used to signify a field within a table or in a \cs\cr
\↑{}&\\\↑{}$\{\}$&Superscript (also used as an accent, see previous page)\cr
\_&\\{\_}& Subscript\cr
\%&\\\%& Comment symbol, the rest of the line is ignored by \TeX \cr
\~{}&\\\~{}$\{\}$& 
Active character, introduces a single space and inhibits a line break 
at this location.\cr}}$$


\noindent{\bf Issuing Commands to \TeX}

Commands to \TeX, as distinguished from the text itself, consist of the
{\sl escape character}, `{\tt \\}', then the name of the command (without an
intervening space) and then, in some cases, the parameters that are
associated with the command.  The command name can be of two types, either
1) a single non-alphabetic character,
or 2) one or more alphabetic characters that must be
terminated by a space if the name is to be followed by other alphabetic
characters.  These alphabetic characters are often in lower case, but
please note that the correct case, as specified, must always be used.
For example, `{\tt \$\\Omega\$}' produces `$\Omega$', while
`{\tt \$\\omega\$}' produces `$\omega$'.

Commands are of two types. Over 300 commands, called {\sl primitives\/}
(listed in Appendix~P), are a part of \TeX 's built-in vocabulary . Then
there are {\sl control sequences}, sometimes called {\sl macros}, that are
constructed from these {\sl primitives\/} (or from other {\sl control
sequences\/}).

Many of the {\sl primitives\/} are normally only used to define {\sl
control sequences\/} and need not concern the beginner, but others specify
basic characteristics of the \TeX 's output, such, for example, as the
page size (`{\tt \\hsize 6.5in \\vsize 8.9in}'),
the desired margins, and the spacing between paragraphs
(`{\tt \\parskip 10pt plus 1pt}').  Some
of the more important of these later are preassigned values by {\tt PLAIN.TEX},
although they can usually be re-specified by the user, either in
a separate file or in the input document itself.

{\sl Control sequences\/} are used to simplify the typing of commands to
\TeX\ , since they are
shorter and easier to remember than the sequence of {\sl primitives}
that they replace.
 Many very useful {\sl control sequences\/} are to be found in the
file {\tt PLAIN.TEX} and these {\sl control sequences\/} are, in effect, added
to the basic vocabulary that \TeX\ understands when this file is preloaded
with \TeX . In addition, there exist a number of special collections of
{\sl macros\/} that \TeX\ experts have found useful for special purposes
such as writing business letters, preparing internal
memoranda, and preparing manuscripts for publication. The very first line
appearing in your source file may well be the control sequence \ \\{\tt
input} \ followed by the name of the file that contains the desired macro
collection, e.g., \ {\tt \\input MYMACS}.  Note that \TeX\ assumes the
extension to be `{\tt .TEX}' if no extension is given.

\TeX , as supplemented by PLAIN, understands well over 900 {\sl control
sequences\/} but many of these are self-evident from their names and
others fall into a relatively few catagories, so that they can be easily
learned when needed.  Some of the more important of these are tabulated in
Appendix C.

\noindent {\bf Fonts}

\TeX\ provides for the use of as many as 256 different fonts, each
containing as many as 256 different characters. {\tt PLAIN.TEX} provides
for 79 of the more useful fonts to be preloaded, although only 15 of these
have preassigned names. The default font, called roman, is requested in
{\tt PLAIN.TEX} by the use of the {\sl control sequence\/} `\\{\tt rm}'.
If you wished the entire text to be typed in boldface you would type
`\\{\tt bf}' as an early line in your text.  If, on the other hand, you
want a single word or a phrase to appear in a different font you should
use the grouping symbols {\tt $\{$} and {\tt $\}$} to delimit the range.

For example, typing \ `{\tt to be $\{$\\bf bold$\}$ is
to $\{$\\sl emphasize$\}$ something}' \ will produce `to be {\bf
bold} is to {\sl emphasize} something'.  Note, however, that a better
spacing is achieved in going from {\it italicized} and {\sl slanted} text to
unslanted text if you type `$\{$\\{\tt it italicized}\\/$\}$ and $\{$\\{\tt
sl slanted}\\/$\}$ {\tt text}' to get `{\it italicized\/} and {\sl
slanted\/} text'.  The `\\/'~is an {\it italic correction\/} which varies
in size from letter to letter.

The following {\sl control sequences\/} are for the type fonts as shown:

$$\vbox{\tt \halign{\hfil#\hfil\quad&\hfil#\hfil\quad&
\hfil#\hfil\quad&\hfil#\hfil\quad&\hfil#\hfil\quad\cr
\\rm&\\sl&\\it&\\tt&\\bf\cr
\rm Roman&\sl Slanted&\it Italic&\tt Typewriter&\bf Boldface\cr
}}$$


Fonts also come in different sizes. To demonstrate, if you type:

\halign{#\cr
`{\tt $\{$\\{tenrm smaller and}$\}$ $\{$\\{ninerm smaller and}$\}$
$\{$\\{eightrm smaller and}$\}$}\cr
{\tt $\{$\\{sevenrm smaller and}$\}$ $\{$\\{sixrm smaller}$\}$}'{\rm
 ,\quad you get} \hfil\cr}

`{\tenrm smaller and} {\ninerm smaller and} {\eightrm smaller and}
{\sevenrm smaller and} {\sixrm smaller}', all lined up to a common {\sl
baseline}.

This manual used so-called {\sl 10~point\/} type which is defined in PLAIN
as \\tenrm, except that the author has chosen to have everything
magnified by 1.2 (for beginners), by having the command `\\{\tt
magnification=1200}' \ appear ahead of any text in the source file. So the
actual
sizes, in the above example, are all multiplied by 1.2.  You may have also
noticed that this manual uses `{\sl slanted type\/}' for emphasis and `{\tt
typewriter type}' for things that you are told to type and for the messages
that the computer displays.

The characters within a font are all assigned serial numbers specifying
their location in the font, which correspond internally to ``ascii''
regardless of the code that your computer may use externally.  You can get
any character, including those that may not be on your keyboard,
by typing `{\tt \\char<number>}' where {\tt <number>} is any decimal
number from 0 to 255, or by typing `{\tt \\char'<number>}' where {\tt <number>}
is an octal number.

Another way to get symbols that are not on your keyboard is to define
{\sl control sequences} for them.  Three useful ones, `{\tt \$\\ne\$}',
`{\tt \$\\le\$}', and `{\tt \$\\ge\$}' for `$\ne$ ', `$\le$ ' and
`$\ge$ ', respectively are defined in {\tt PLAIN.TEX}.


\noindent {\bf Dimensions and Key Words}

\TeX\ understands a variety of dimensional units and uses two-letter
abbreviations for their names.  These abbreviations are used without the
`{\tt \\}' symbol and they are defined as {\sl key words}, that is, words that
convey fixed meanings to \TeX\ when they are used in the proper context.
These units and their meanings are:

$$\vbox{\halign{\tt \hfil#\hfil\quad&#\quad&#\qquad\qquad\hfil
&\tt \hfil#\hfil\quad&#\hfil\quad&#\cr
{\rm Abbr.}&Name&Per inch&{\rm Abbr.}&Name&Per inch\cr
\noalign{\smallskip}
pt&point&72.27&mm&millimeter&25.4\cr
pc&pica&6.023&dd&Didot point&67.54\cr
in&inch&1&bp&big point&72\cr
cm¢imeter&2.54&mi&mica&2540\cr}}$$

Sometimes it is convenient to use dimensions that are relative to the
character sizes in the font being used at the time. Two such units are
the `{\tt em}' and the `{\tt ex}'.
The `{\tt em}' is used for measuring horizontal distances, which, by tradition, is
the width of the upper case `M'  but which is an arbitrarily assigned value in
\TeX\ that is the width of a `quad'.  The `{\tt ex}' is used for measuring
vertical distances and is approximately the height of a lower case `x'.

\noindent {\bf To use \TeX }

Having written a simple file, say, {\tt MYFILE.TEX}, which contains the desired
text together with a few {\sl control sequences\/} that define your
wishes, you may now call \TeX\ by typing:  \ \ `{\tt R~tex82;MYFILE}', \
that is, if your computer system supports this construction.
Alternatively, you may have to type \ `{\tt TEX82}', or perhaps, `{\tt run
TEX}' and wait for a double asterisk `{\tt **}' prompt before typing the
name of your file.  Note, that the `{\tt **}' response signifies that
\TeX\ is prepared to accept a file name (if the first character is not a
`{\tt \\}' or an `{\tt \&}').  If, on the other hand, the prompt is a single asterisk
`{\tt *}', (or if you are calling for another file within a file) then you
must precede the file name by the `{\tt \\input}' command thus:  `{\tt
\\input MYFILE}'.  If no extension is used, \TeX\ assumes it to be `{\tt
.TEX}'. Also remember to use lower case type for the word `{\tt input}'.

The source file itself may begin by referencing one or more additional
files (this time using the `{\tt \\input}' command).  These files may
define some special fonts that are to be used and they may contain the
definitions of some speciallized, frequently-used, constructs ({\sl
control sequences\/} or {\sl macros\/}) that are used to simplify the
typing of the desired instructions.  Once defined, these constructs can
then be called by name as needed in the text file itself. Caution: do not load up your
working space with macros that you never use.

The \TeX\ program produces a {\tt DVI} (\undertext{d}e\undertext{v}ice
\undertext{i}ndependent) file, that specifies the exact location on the
page and the font for each character.  Details as to the format of the
{\tt DVI} file itself are summarized in Appendix D.\ The {\tt DVI} file may require
some further translation before it is acceptable as input to the available
printer but on most systems this further action is usually automatic,
requiring, at most, a carriage return confirmation.

It should be noted that \TeX\ does not need to know the exact shape
of each character but it does need to know the overall size and the
details as to how the individual characters may interact with adjacent
characters (resulting in ligature replacements or in kerning). This
information is usually contained in what are known as {\tt .TFM} files.  The
printer, on the other hand, does need to have access to the detailed
information as to the exact configuration of each character that is to be
printed and this information is usually contained in what are known as
{\tt .PXL} files. The two sets of files must agree as to the fonts that they
describe or chaos will result.

{\bf Boxing with Glue}

There are a few facts about the innner working of \TeX\ that you will
need to know.
\TeX\ approaches the task of formatting a page of text much as a mason
might build a brick wall, which is to be laid in courses to a fixed
width using bricks that vary in size (and that have to be used in a fixed
order), with limits as to the minimum and maximum amount of mortar that
can be used between bricks.

\TeX\ happens to use different terms which you should learn to recognize.
Instead of {\sl bricks}, \TeX\
talks about `{\sl hboxes\/}' (the words in your text), which it assembles
out of simple `{\sl boxes\/}' (the individual letters). No {\sl mortar}
is used between letters
so words always look the same.
There may be some
`{\sl kerning}', e.g., there will be less space between an `o' and an `x', as in 
box, than
there will be between two `o's as in book.
\TeX\ then puts these {\sl hboxes\/} together to form
larger {\sl hboxes}, (the lines of your text), using `{\sl glue\/}', in place of
{\sl mortar} for the inter-word and inter-sentence spacings.
The {\sl glue\/} has properties of being {\sl
stretchable} and, to a lesser extent, {\sl shrinkable}.  This longer
{\sl hbox\/} is then expanded or compressed to make it meet
the `{\sl hsize\/}' dimension that has been preset by {\tt PLAIN} or that you
have changed by typing {\tt \\hsize 4.25in}, for example.  

Plain \TeX\ takes care of such details as putting more space after commas
(usually 1.25 times) and after periods (usually 3 times) and it allows
these globs of glue to stretch more and shrink less than that allowed for
the normal glue between words. While this is desirable in most cases,
there are times when it is not desired and then you should use the {\sl
backslash-space control sequence}, `{\tt \\ }', to guarentee a normal
space, or perhaps use the {\sl tie} symbol,\break
` $\tilde{ }$ ' (in place of the space) for the case of
an abbreviation such as in `{\sl Fig.~23}' or {\sl Mr.~Smith}, where it is
also desirable to prevent the sentence from being broken between the
abbreviation and the following number or word.

\TeX\ treats an entire paragraph as a unit and tries to distribute the
text into as many lines as are required with the individual lines meeting
the {\sl hsize\/} requirement without excessive stretching or shrinking.
If this cannot be done, \TeX\ then tries to hyphenate.  Actually, \TeX\
will usually find several ways that the paragraph can be broken, and it
will then pick the way that it thinks is best.

\TeX\ will complain with an `{\tt overfull hbox}' \ message, if it is
unable to meet the tolerances that have been set in {\tt PLAIN} ({\tt
\\looseness 0 \\hfuzz 0.1pt}) or that you have specified.

Your task then is to inspect the offending line or lines to see if there
is some simple way to overcome the difficulty, perhaps a discretionary
hyphen is needed.  Lacking such a remedy, you can force a line break at an
earlier place in the offending line or earlier in the paragraph (using
{\tt \\break}), but this is seldom desirable. It is usually better
to simply reconstruct the sentence or paragraph so as to avoid the
trouble. Actually, there are a number of ways that you can anticipate
trouble and provide for it in advance, as you will learn through
experience.

\noindent {\bf An Example}

Perhaps, it is time to stop and show you an example, and what better
example than the title page of this  manual itself, which was typed using plain \TeX.
This example may seem a bit too complicated for a beginner but it does
provide a convenient vehicle to illustrate a number ot \TeX's
ideosyncrasies that you need to know about and that are hard to explain in
the abstract. So do go through it line by line with the explanation that
follows.

My file is called {\tt primer.tex} and it is divided into pages, although
this is not required and some installations may not permit this nicety.
\TeX, of course, ignores these page breaks, just as it ignores the line breaks 
that I insert.
I will
limit the example to the two pages of my source file, and I will
fudge a bit by omitting a few macros that are actually on the first page
but that were not used in typing the cover page, and
indeed need never to have been used for the entire manual, except as a
matter of convenience.

The first page of the source file defines some \css\/\ and contains: \medskip
\vbox{\halign{\tt #\hfil&\hfil #\cr
\%\ This is the "TEX Beginner's Manual" source text\cr
\noalign{\medskip}
\\font\\ninerm=cmr9\ \ \\font\\eightrm=cmr8\cr
\\font\\sixrm=cmr6\ \ \\font\\mc=cmcsc\cr
\\font\\seal=stan70 \% For use to produce the Stanford seal.\cr
\noalign{\medskip}
\\def\\TeX$\{$T\\kern-.1667em\\lower.5ex\\hbox$\{$E$\}$\\kern-.125em X$\}$\cr
\ \% For use to produce the \\TeX\\ logo. Copied from PLAIN to show that \cr
\ \%  control sequences may be redefined and to show how it is done.\cr
\noalign{\medskip}
\\magnification=1200 \ \%\ This magnifies everything by 1.2. \cr
\noalign{\medskip}
\%\ Some assignments to override those made by PLAIN\cr
\\parskip 10pt plus 1pt \ \%\ This puts an empty line between paragraphs\cr
\ \ \ \%\ and allows this space to be increased by as much as 1 point if needed\cr
\\parindent 0pt \ \%\ Paragraphs are not to be indented\cr}}
The source information for the title page contains: \medskip
\vbox{\halign{\tt #\hfil&\hfil #\cr
\\nopagenumbers \%\ The title page is not to be numbered.\cr
\\null\\vskip-46pt \% Put the first line 46 points higher than normal\cr
\\hbox to 6.5truein $\{$Stanford Department of Computer Science\\hfil August 2, 1983$\}$\cr
\ \ \ \% The \\hbox construction is a convenient way to line things up.\cr
\\vskip .1in \% Skip down 0.1 inch\cr
\\line $\{$Report No. STAN-CS-83-***\\hfil(Version 0.1)$\}$\cr
\\vfill \% This and similar commands later, to divide the space evenly.\cr
\\centerline$\{$\\bf First-Grade \\TeX$\}$\cr
\\vskip .1in\cr 
\\centerline$\{$\\bf A Beginner's \\TeX\\ Manual$\}$\cr
\\vskip .25in\cr
\\centerline$\{$by$\}$\cr
\\centerline$\{$Arthur L. Samuel$\}$\cr
\\vfill\cr \\centerline$\{$\\seal S$\}$\cr
\\vfill\cr
This manual is based on the publications of Donald~E.~Knuth who originated\cr
 the \\TeX\\ system and on the recent work of Professor Knuth and\cr
his many students and\cr
collaborators who have helped bring the \\TeX82 system to its present\cr
advanced state of development. The \\TeX\\ logo that is used in\cr
this manual is a trademark of The American Mathematical  Society.\cr
 \cr
\\eject\\end\cr}}
\medskip
So let us consider this example in detail.
\eject

We first note that
the \cs\/\ `{\tt \\font}' is used to assign names to several fonts that {\tt
PLAIN} had loaded but did not name.  Actually, only one of these fonts was
used on the cover page but it is good practice to start your source file
by naming all of the fonts that you use (if they are not already named by
the {\sl macro} package that you are using.  Note that this same \cs\/\ would
have instruct \TeX\ to copy the font metrics from the named file, if the
{\sl font} had not been preloaded. \TeX\ also assumes that the extension {\tt
.TFM} is a part of the file name.

Next comes a definition for the \TeX\ logo. You will probably not need to
cause letters to be artificially displaced from their normal positions,
but if you do, here is an example.  It also serves as a model for other
\cs\/\ definitions that you may find occasion to use.  The `{\tt
\\magnfication}' \ macro has already been explained (under {\bf Fonts}).

The \cs\/\ `{\tt \\parskip 10pt plus 1pt}' is an example of a general class
of \css\/\ that take dimensions.
I could have written it as
`{\tt parskip10pt plus 1pt minus 1pt}' had I been willing for the space to
be shrunk by as much as 1pt on some occasions and stretched on others.
Incidentally, plain \TeX\ sets
`{\tt \\parindent=20pt}', \ but this has been redefined for this manual by
`{\tt \\parindent 0pt}'. \ \ Note that the use of the `{\tt =}' sign is optional but that
a unit of measure must be specified even when the value is zero.
So much for the first page.

After telling \TeX\ that the title page is not to be numbered, the information
for this page
starts with the \cs\/\ `{\tt \\null}', which, as its name implies,
normally does nothing.  So why use it?  One of \TeX's ideosyncracies is
that it gobbles up extra spaces that you leave between words, extra space
between paragraphs, and any extra space that might be left over when it
has just introduced a page break.  So, without the `{\tt \\null}', Tex
will assume that the negative space called for by the `{\tt \\vskip-46pt}'
\cs\/\ was left over from a previous page and simply gobble it up.  The `{\tt
\\null}' \cs\/\ starts the new page by putting almost nothing (actually
an {\sl hbox} that contained nothing) on the first
line.  Now since the page has been started, the negative-space \cs\/\ is
honored.  The {\tt \\vskip} {\sl macro}
 is an example of a \cs\/\ that takes a dimension.
Looking down the page, you will see other examples.

The next \cs, `{\tt \\hbox to 6.5 truein}', also takes a dimension, but in this case
using the extra word `{\tt to}'. The dimension in this case
is in true inches since I did not want the value to be subject to the
{\tt \\magnification} command.  Two lines below this is another \cs, `{\tt
\\line}', that does essentially the same thing, in the context of this
example, since {\sl \\line} is defined in {\tt PLAIN} to produce an {\sl \\hbox}
to the current dimension of {\sl \\hsize}, which
happens to be 6.5 true inches.
Were I later to alter
the page width by changing {\sl \\hsize}, I would have to find and
alter all \css\/\ of the first variety if I wanted the lines that they produced
to still line up with the rest of the text, so the {\tt \\line} form is better in
this case.

The text that is to be put in each of these two {\sl hboxes} is enclosed
in {\sl grouping} symbols and contains still another \cs, to wit, `{\tt
\\hfil}'. This tells \TeX\ where to put the extra space needed to fill out
the text to exactly 6.5 inches, with the text before the {\tt \\hfil}
{\sl flushed left} and the text to the right of it {\sl flushed right}.
Without this `{\tt \\hfil}' \cs, \TeX\
complains ({\tt (Underfull box (badness 10000)}), and then prints the
first of these two line as:\hfil\break
 \line {Stanford Department of Computer Science August 2 1983}
 I could, of course, have caused \TeX\ to print this
line without complaining had I put {\tt \\hfil}'s between all of the
words.

But to continue with the example, The \cs\/\ `{\tt \\centerline}' \ is
another \cs\/\ that
requires the use of {\sl grouping} symbols to enclose the text to be
centered, that is, if you want more than the single next character to be
centered.  Then there is an embedded \cs\/\ within the {\sl grouping
symbols} which specifies that the centered text is to be in {\bf bold face
type}.

It can be a bit confusing to observe that some \css\/\ take arguments
within {\sl grouping} symbols while others are placed within the {\sl
grouping} symbols along with the text that they affect. There is always a
logical reason for this difference in treatment.  When \TeX\ has
interpreted the centering command, it must look ahead to determine how
much text there is to be centered before taking any action, and it expects
to find this information within a pair of grouping symbols.  By way of
contrast, \TeX\ can start putting text in a different font without needing
to know the range over which this command is to be effective. So, if you
want the range of action to be limited, you put the font designation
within the grouping symbols and the former font choice is reinstated when
the closing symbol is reached.  If you would like a more detailed
explanation, you should refer to ``The \TeX book'' by Don Knuth.

Next note the use of three `{\tt \\vfill}' \css\/\ to divide the excess
vertical space that remains available on the page into three equal
portions.  The fact that I used one `{\sl l\/}' in `{\\hfil} and two '{\sl
l\/}' in {\tt vfill} was deliberate, to call attention to the fact that
both forms work for both horizontal or vertical {\sl fills}.  The two
`{\sl l\/}' variety simply is more stretchable than the one `{\sl l\/}'
variety and will do all of the stretching if both forms are used together.

Finally, there is some normal text at the bottom of the page and then the
commands {\tt \\eject \\end} that causes \TeX\ to finish off the page then
to close out the {\tt DVI} file and terminate the session.  Had this been
a normal text page, I would have used the \cs\/  {\tt \\bye} which
is a plain \TeX\ macro for {\tt \\vfill\\eject\\end}.  The {\tt \\vfill} gets
\TeX\ into vertical mode (without having to leave a blank line) and
inserts enough space to fill up the last page, this latter being something
that I did not want in this case.

Compare this with the title page itself.

It will help your understanding if you make
a file containing a title page for some paper that you have written or
intend to write by copying this sample and modifying it as needed.  Then
try to run \TeX\ on this file.  Unless you are extremely lucky, you will
be apt to get an error message that you will not understand---so read on.

If you have been lucky you might try changing the page width by putting
`{\tt \\hsize=4truein}' at the top of your text, or better yet start \TeX\
so that you get the `{\tt **}' prompt and then type `{\tt \\hsize=4truein}',
a space and then the name of your file.  If this still works, then try 2
inches.

{\bf Understanding Error Messages}

Most of the errors that the beginner is apt to make, other than simple
typos will have to do with 1)~missing or misplaced {\sl grouping} symbols,
2)~attempts to use \css\/\ in the wrong context, and 3)~a failure to understand
some of the principles that \TeX\ uses in deciding how to break the text
into lines and these lines into pages with the result that you ask it to do
some quite impossible things.

\TeX\ will report that \ `{\tt (\\end occurred inside group at level 1)}'
\ if a single `$\}$' is missing and \ `{\tt too many $\}$'s}' \ if this
contrary condition exists. Usually it will have reported all sorts of
strange things that the the mismatch of {\sl grouping} symbols will have
caused. So find and fix the {\sl grouping} trouble before checking
further.

\TeX\ may get confused if you tell it to do something out of context, for
example, to do something that relates to the formating of words into
sentences when it is busy putting sentences onto pages.  At any given time,
\TeX\ will be operating in any one of six different {\sl modes}, as will
be explained in a separate section below, and it may well complain to the
effect that `{\tt !~You can't do that in restricted horizontal mode}', or
something similar.  Note, however, that there are quite a few \css\/\ that relate
to one mode of operation that can actually be given when \TeX\ is in a different
mode and that then signal the switching of modes as well as telling \TeX\ what to do
after the mode change. 

Finally, you need to know that
\TeX\ decides how to format the text by
considering the amount of `{\sl badness\/}' that is charged
against each possible arrangement. {\sl Penalties\/} are assigned to each
possible line break point, usually automatically although you can specify
a penalty if you wish.  These {\sl penalties\/}
measure the undesirability of a break occuring at each particular place.
{\sl Demerits\/} are assigned, 1)~to each line for different features as
to its departure from the ideal, 2)~for the presence of adjacent lines
that differ from each other too much in their {\sl looseness\/} or that
are too similiar in certain obnoxious ways, for example, in both ending
with a hyphen, and 3)~for poor paragraphing, such as
leaving a {\sl widow\/} word to appear at the top of a new
page.
If \TeX\ is unable to find a solution that will meet certain tolerance limits,
it will complain, usually about the `{\tt badness}', and
expect you to do something to fix the difficulty.


{\bf The Six Modes}

When \TeX\ is processing your text, it is constantly switching between six
different {\sl modes} of operation.  The details of these {\sl modes} need
concern you only when \TeX\ reports an error on your part
or when you are doing something special like making a table or
displaying an equation.

The two most obvious {\sl modes} are, 1)~the {\sl horizontal mode} when
\TeX\ is putting letters together to form words, that is, {\sl hboxes} and
when it is putting these {\sl hboxes} together horizontally, to form larger
{\sl hboxes}, and 2)~the {\sl vertical mode} when it is stacking these
{\sl hboxes} (or already prepared {\sl vboxes}) vertically to go on a
page. \TeX\ switches from {\sl horizontal mode} to {\sl vertical mode} when it
encounters something that clearly indicates that it should be in the {\sl vertical
mode}, such, for example, as 1)~an empty line or the {\sl control sequence}
{\tt \\par}, both of which tells it to start a new paragraph, or 2)~a v-type
{\sl control sequence}, such as {\tt \\vfill} or {\tt \\vskip .1in}, both of which were
used in the example on page~8.  \TeX\ switches from {\sl vertical mode} to {\sl 
horizontal mode} when it encounters an ordinary character or any one of several 
{\sl horizontal mode control sequencees} such, for example, as {\tt \\indent} or
{\tt \\noindent} with obvious meanings.

The six {\sl modes} are:
$$\vbox{\halign{#\quad\hfil&#\hfil\cr
\quad Mode&\qquad Used when building\cr
\noalign{\smallskip}
Vertical&Main vertical list for a page\cr
Horizontal&Horizontal list for a paragraph\cr
Internal vertical& Vertical list for a vbox\cr
Restricted horizontal&Horizontal list for an hbox\cr
Math&Mathematical formula for a horizontal list\cr
Displayed math&Math formula on a separate line.\cr}}$$

You signal the entering and leaving of the {\sl math mode} by the use of a
single `\$' sign thus `{\tt \$<math~text>\$}', and the entering and
leaving of the {\sl display math mode} by the use of a pair of \$ signs thus
`{\tt \${}\$<text~to~be~displayed>\${}\$}'.  The display math mode is useful
for tables that may actually not involve mathematical material because it
centers material on the page and introduces a space above and below the
material. But more on this matter later.

A typical use of {\sl restricted horizontal} mode occurs when you center some
material on the page by writing `{\tt \\centerline$\{$\\bf\ First Grade \\TeX $\}$}'.
\TeX\ will be in the {\sl vertical} mode on encountering the
`{\tt~\\centerline}' \ control
sequence, it will shift to the {\sl restricted horizontal} mode while
processing the  material delineated by the braces and then back to
 he {\sl vertical} mode to add this to the material that is to form the page.

{\bf Making Tables}

\TeX\ provides two different methods for typsetting tables.

The first method apes the typewriter's tab-setting ability.  Tabs, once
set by the {\tt \\settabs} command, are preserved when you introduce some
ordinary text (or even with a {\sl grouping-symbol\/}-delineated insertion
of a table with a different set of tab settings). This makes it possible
to have several different tables, on the same page or even on different
pages, that are similiar in their columnar alignments.  The disadvantage
is that you must specify where these tab settings are to be, either by
giving the number of colums, if they
are to be evenly spaced, or by supplying a set of sample entries made up
of the largest entry for each individual column.  This can be a bit
difficult to do if the table contains characters of different widths.
This method is, however,
 much to be prefered for large tables that may extent over
several pages.

The second method uses the `{\tt \\halign}' \cs, which gives \TeX\ the
task of setting the tab positions for each column to meet the possibly
varying maximum widths of the material that goes into these different
columns.  This {\tt \\halign}\ method allows you to achieve an optimum
design for each table, but it leads to a possible lack of uniformity
between different tables. The tables on pages 2, 3, 4, and 5 of this
manual were all made using this second method. Having made these tables,
were I suddenly to find it necessary to replace an entry by a longer one, I
could trust \TeX\ to automatically readjust the column widths if necessary.
This method should not be used for large tables that may extend over several
pages as \TeX\ must read the entire table in order to determine the column widths.
We will consider this second method first.

{\bf The `{\tt \\halign}' Alignment Method}

The table on the bottom of page 4 will be used as an example. 
This was typed as:


\vskip 10pt
\vbox{\tt \halign{#\hfil&#\hfil\cr
\$\$\\vbox $\{$\\tt \\halign $\{$\\hfil\#\\hfil\\quad\& \\hfil\#\\hfil\\quad\&\cr
\\hfil\#\\hfil\\quad\& \\hfil\#\\hfil\\quad\& \\hfil\#\\hfil\\quad \\cr\cr
\\\\rm\& \\\\sl\& \\\\it\& \\\\tt\& \\\\bf\\cr\cr
\\rm Roman\& \\sl Slanted\& \\it Italic\& \\tt Typewriter\& \\bf Boldface\\cr\cr
$\}\}$\$\$ \cr
}}

which looks like quite a mouthful but let's take it step by step.  

The first two lines and the last line of the source text have to do with
the mechanics of setting up the table. The material that goes into the two
lines of the printed table is specified in the third and fourth lines.  

The `{\tt \$\$}' at the start and end of this source-text sample is used
here to center the table and to introduce some space above and below it.
As explained earlier, the use of the double-dollar-sign construct normally
causes \TeX\ to enter the {\sl displayed math} mode.  By following the 
{\tt \$\$} with the {\tt \\vbox} control sequence, the other math mode
effects are temporarily suspended so that the table will appear in normal
non-math characters.
The {\tt \\vbox}
has the additional effect of preventing \TeX\ from splitting the table
between pages; {\sl vboxes}, when once made, are never split.  The `{\tt
$\{$}', that follows, and the very last `{\tt $\}$}' on the last line are
the {\sl grouping} symbols that define the material that is to be put in
the {\sl vbox}.  Since much of the material is to be in `{\tt typewriter}
type, we start with the `{\tt \\tt}' \cs, and then comes the `{\tt
\\halign}', which is followed by a series of statements, each ending with
the \cs\ `{\tt \\cr}'.

The first statement, sometimes called the {\sl preamble},
 is a {\sl template} that refers to the material that is to
go into each column by the parameter symbol `{\tt \#}', that separates
the material to go into the different columns by the {\sl alignment tab}
symbol `{\tt \&}', and that may specify how the entries are to be positioned
within the columns.
Incidentally, the `{\tt \&}' symbol has the useful
property of ignoring any extra spaces that immediately follow it, so I have
 split the template into two lines for convenience in
typing, and I have 
added  spaces after all the other `{\tt \&}' symbols to make the example
easier to read.
The specifications for the individual columns are
all the same, to wit:  `{\tt \\hfil \#\\hfil \\quad}'.  This says: put
some infinitely stretchable glue (as specified by `{\tt \\hfil}')
on each side of the entry to force it to
be centered in the column (with the column made wide enough to accomodate the
largest item assigned to it) and
allow 
one {\sl quad} of space between
this column and the column that follows it. The
template is terminated by the \cs\/\ `{\tt \\cr}'.

Since the first row of the table is to be printed in the default font, the first
text line simply
lists the entries, separating
them by the `{\tt \&}' symbol.  Note that I must use the `{\tt \\\\}'
\cs\/\ to get the backslash to be printed as an ordinary character.  This
line is terminated, again, by the `{\tt \\cr}' \cs.  The final text line,
listing the name of the fonts, has each name preceded by the appropriate
\cs\/\ so that the name is printed in the indicated typeface.  Note,
especially, that it is not necessary to use {\sl grouping} symbols within
the individual table entries. The `{\tt \\halign} mechanism automatically limits
the range of action for \css\/\ that are normally delimited by grouping  to
the individual table entry in which they are used.
Actually, it would not have been necessary
to specify the font to be used to type `{\tt Typewriter}' since `{\tt
\\tt}' is the default font, but specifying it renders the entry immune to
change if the default font assignment should be changed. 

You now know enough to reproduce all of the tables that have appeared so
far in this manual except for the table on page 3 which uses a couple of
techniques that must now be described.  

The first of these is to define
the space between the column headings and the first table entry by using
a line that reads:
 `{\tt \\noalign~$\{$\\smallskip$\}$}', 
where `{\tt \\smallskip}' \ is defined below.
The `{\tt \\noalign }' \cs\/\ can be used
within an `{\tt \\halign}'  to allow you to introduce {\sl vertical mode}
\css, such as the `{\tt \\smallskip}',  as here used, or to issue other commands to
\TeX, or even to introduce lines of text, as you will see below.

It is usually better to use one of the following \css, as defined in {\tt
PLAIN.TEX} than to specify the {\tt \\vskip}  for each table individually,
as you will only need to redefine one \cs\/\ to change the spacings used in
all the tables where this \cs\/\ is used, should such a format change
ever become desirable.

$$\vbox{\halign{#\quad\hfil&#\hfil\cr
\quad Macro&\qquad \qquad Equivalent to\cr
\noalign{\smallskip}
\tt \\smallskip &\tt \\vskip 3pt plus 1pt minus 1pt\cr
\tt \\medskip &\tt \\vskip 6pt plus 2pt minus 2pt\cr
\tt \\bigskip &\tt \\vskip 12pt plus 4pt minus 4pt\cr}}$$

The extra space that appears between the sets of
rows in the table at the bottom of page~2 could have used the `{\tt
\\noalign}' construct but I chose to make these spaces equal to the space
occupied by one line of type and so I simply introduced an extra `{\tt
\\cr}' in two different places, just to show that this also works.

The final new feature in the table on page 3 has to do with the provisions
that were made to allow the text in the third column to occupy more
than one line when this is necessary, and to be justified. 
The first five lines for this table were typed as follows:

\smallskip {\tt \obeylines \parskip 0pt 
\$\$\\vbox$\{$\\lineskip 0pt \\tabskip 0pt plus1fil 
\\halign$\{$\\tabskip 0pt \\strut \\tt \\hfil \#\\hfil \\quad \&
\\tt \\hfil \#\\hfil \\quad \& 
\\vtop$\{$\\hsize=26em
\\hangindent 1em \\strut \#\\strut$\}$\\tabskip 0pt plus 1fil\\cr}

\smallskip
As usual the table is put into a {\tt \\vbox} so that it will not be split
between pages. But then, if you look ahead to the fourth line, you will see
that still another {\tt \\vbox}, this time one called `{\tt \\vtop}', is
used to enclose the specification for the third column material in the
table.  Putting the third-column item into a {\sl box} and
specifying that this {\tt \\vtop} is to
be governed by the \cs, `{\tt \\hsize=26em}' is one way of telling \TeX\
that you want the text to be justified to a total width of {\tt 26em}.  A
{\tt \\vtop} is used because this \cs\/\ will position the resulting {\sl box}
so that
the top line of the justified text will be aligned with
the other material in the row.  The usual {\sl \\vbox} would align the
bottom line instead.

Unfortunately, if this was all that you did, you would be apt to get some
raggedly positioned lines of text because the position of the bottom of
the {\sl box} would depend upon the presence or absence of characters with
{\sl desenders} (the letters g, j, p, q, and y), and the next line in the table
would be positioned with reference to this bottom location.  This can be
handled by setting the normal interline spacing, as defined by `{\tt
lineskip}', to 0pt, and then using the `{\tt \\strut}'\ \cs\/\ to space the
lines.  A `{\tt \\strut}',\ as defined in {\tt PLAIN}, produces a zero-width
invisible box of the correct vertical dimensions for the 
currently used font. So the {\tt \\strut}\ \cs\/\
is inserted in the {\sl preamble}, once before the `{\tt \\tt}'\ \cs\/\
that specifies the font to be used for the first column entry (the
critical dimensions for the {\tt \\tt} font may be slightly different from
those for the {\rm \\rm} font) and once before and once after the {\tt \#} that calls
for the third-column text.  The one before the `{\tt \#}' will be put on
the first line of the justified text and the second one will be left to be
put on the second line, if there is one.
A final \cs,\ `{\tt \\hangindent 1em}' is used to cause the second line to
be indented by {\tt 1 em}.  

If you want to make tables that are significantly more complicated than
those used so far, you need to be an expert so you will have to study
``The \TeX book'' The following example illustrates still other features.
This example is taken from ``The \TeX
book'' and attributed to Machael Lesk as published in the ``Bell
Laboratories Computing Science Technical Report {\bf 49} (1976). The table
is printed twice, once by `{\tt \\halign to130pt}' and once by `{\tt
\\halign to 200pt}', just to show you how this is done.

$$\hbox to\hsize{%
\vbox{\tabskip=0pt \offinterlineskip
\def\tablerule{\noalign{\hrule}}
\halign to130pt{\strut#&\vrule#\tabskip=1em plus2em&
  \hfil#&\vrule#&\hfil#\hfil&\vrule#&
  \hfil#&\vrule#\tabskip=0pt\cr\tablerule
&&\multispan5\hfil AT\&T Common Stock\hfil&\cr\tablerule
&&\omit\hidewidth Year\hidewidth&&
 \omit\hidewidth Price\hidewidth&&
 \omit\hidewidth Dividend\hidewidth&\cr\tablerule
&&1971&&41--54&&\$2.60&\cr\tablerule
&&   2&&41--54&&2.70&\cr\tablerule
&&   3&&46--55&&2.87&\cr\tablerule
&&   4&&40--53&&3.24&\cr\tablerule
&&   5&&45--52&&3.40&\cr\tablerule
&&   6&&51--59&&.95\rlap*&\cr\tablerule
\noalign{\smallskip}
&\multispan7* (first quarter only)\hfil\cr
}}\hfil
\vbox{\tabskip=0pt \offinterlineskip
\def\tablerule{\noalign{\hrule}}
\halign to200pt{\strut#&\vrule#\tabskip=1em plus2em&
  \hfil#&\vrule#&\hfil#\hfil&\vrule#&
  \hfil#&\vrule#\tabskip=0pt\cr\tablerule
&&\multispan5\hfil AT\&T Common Stock\hfil&\cr\tablerule
&&\omit\hidewidth Year\hidewidth&&
 \omit\hidewidth Price\hidewidth&&
 \omit\hidewidth Dividend\hidewidth&\cr\tablerule
&&1971&&41--54&&\$2.60&\cr\tablerule
&&   2&&41--54&&2.70&\cr\tablerule
&&   3&&46--55&&2.87&\cr\tablerule
&&   4&&40--53&&3.24&\cr\tablerule
&&   5&&45--52&&3.40&\cr\tablerule
&&   6&&51--59&&.95\rlap*&\cr\tablerule
\noalign{\smallskip}
&\multispan7* (first quarter only)\hfil\cr}}}$$

These tables were produced by typing:
\medskip
\vbox{\tt \halign{#\hfil\cr
\$\$\\hbox to\\hsize$\{$\\vbox$\{$\\tabskip=0pt \\offinterlineskip\cr
\\halign to130pt$\{$\\strut\#\& \\vrule\#\\tabskip=1em plus2em\& \\hfil\#\& \\vrule\#\& \cr
\\hfil\#\\hfil\& \\vrule\#\& \\hfil\#\& \\vrule\#\\tabskip=0pt\\cr \\noalign$\{$\\hrule$\}$\cr
\& \& \\multispan5\\hfil AT\\\& T Common Stock\\hfil\& \\cr \\noalign$\{$\\hrule$\}$\cr
\& \& \\omit\\hidewidth Year\\hidewidth\& \& \\omit\\hidewidth Price\\hidewidth\& \& \cr
 \\omit\\hidewidth Dividend\\hidewidth\& \\cr \\noalign$\{$\\hrule$\}$\cr
\& \& 1971\& \& 41--54\& \& \\\$2.60\& \\cr \\noalign$\{$\\hrule$\}$\cr
\& \&    2\& \& 41--54\& \& 2.70\& \\cr \\noalign$\{$\\hrule$\}$\cr
\& \&    3\& \& 46--55\& \& 2.87\& \\cr \\noalign$\{$\\hrule$\}$\cr
\& \&    4\& \& 40--53\& \& 3.24\& \\cr \\noalign$\{$\\hrule$\}$\cr
\& \&    5\& \& 45--52\& \& 3.40\& \\cr \\noalign$\{$\\hrule$\}$\cr
\& \&    6\& \& 51--59\& \& .95\\rlap*\& \\cr \\noalign$\{$\\hrule$\}$\cr
\\noalign$\{$\\smallskip$\}$\cr
\& \\multispan7* (first quarter only)\\hfil\\cr $\}$$\}$\\hfil\cr
\\vbox$\{$\\tabskip=0pt \\offinterlineskip\cr
\\halign to200pt$\{$\\strut\#\& \\vrule\#\\tabskip=1em plus2em\& \\hfil\#\& \\vrule\#\& \cr
\\hfil\#\\hfil\& \\vrule\#\& \\hfil\#\& \\vrule\#\\tabskip=0pt\\cr \\noalign$\{$\\hrule$\}$\cr
\& \& \\multispan5\\hfil AT\\\& T Common Stock\\hfil\& \\cr \\noalign$\{$\\hrule$\}$\cr
\& \& \\omit\\hidewidth Year\\hidewidth\& \& \\omit\\hidewidth Price\\hidewidth\& \& \cr
 \\omit\\hidewidth Dividend\\hidewidth\& \\cr \\noalign$\{$\\hrule$\}$\cr
\& \& 1971\& \& 41--54\& \& \\\$2.60\& \\cr \\noalign$\{$\\hrule$\}$\cr
\& \&    2\& \& 41--54\& \& 2.70\& \\cr \\noalign$\{$\\hrule$\}$\cr
\& \&    3\& \& 46--55\& \& 2.87\& \\cr \\noalign$\{$\\hrule$\}$\cr
\& \&    4\& \& 40--53\& \& 3.24\& \\cr \\noalign$\{$\\hrule$\}$\cr
\& \&    5\& \& 45--52\& \& 3.40\& \\cr \\noalign$\{$\\hrule$\}$\cr
\& \&    6\& \& 51--59\& \& .95\\rlap*\& \\cr \\noalign$\{$\\hrule$\}$\cr
\\noalign$\{$\\smallskip$\}$\cr
\& \\multispan7* (first quarter only)\\hfil\\cr$\}$$\}$$\}$\$\$\cr
}}

By using this listing as a template you may be able to create tables of
your own if the do not depart too far from this basic design.
So let us go down this source listing line by line.

These tables differ in a number of important ways from those discussed so
far.  Looking at the printed tables only, the most obvious difference is
the use of so-called `{\sl rules}', to enclose and separate the entries.
You will also note that one entry extends over several columns within the
area defined by the outside {\sl rules\/} and the last entry also extends
over several columns.  Finally, while the numerical items in the Year
column and in the Dividend column seem to be `{\sl flushed right}', the
words `Year' and `Dividend' and entry `.95*' are certainly not.

To put the two tables side by side, I
defined a `{\tt \\hbox to \\hsize}' that contains the the two tables
separated by a {\tt \\hfill} to provide the
stretchable glue between the two.  \TeX\ has no trouble putting these two
tables side by side, as they are the same height, and so they are
simply treated in the same way that two words are treated.
Had the two tables not been of the
same height, they would have been lined up to a common {\sl baseline\/},
or by the proper use of {\tt \\vtop} they could be top-aligned.

Before we get to the {\tt halign}, we set two parameters to zero so that
the `{\sl \\strut\/}'\ \cs\/\ can be safely used. Setting `{\tt
tabskip=0pt}'\ may not be needed since {\sl tabskip\/} is usually set to
zero, but we are going to changing it later and it might have posibly been
left wrongly set.  \TeX\ normally puts some {\sl tabskip\/} glue before
the first column, between columns, and after the last column in each line
of an alignment. and we will want take advantage of this feature to help center
the entries.

The `{\tt offinterlineskip}' \cs\/\ is used to set the usual interline
spacing to zero.  \ This prevents \TeX\ from interposing glue between the
the individual {\tt \\vrule} segments, glue that would prevent them from
abutting each other properly. Having done this, we must then specify the
vertical space assigned to these {\tt vhules\/} (and to the text as well)
by using a \cs\/\ called a `{\tt \\strut}'. \ \ A {\tt \\strut}, as
defined in {\tt PLAIN}, produces a zero width invisible box of the correct
height for the font being used. Incidentally, a character can be assigned
a zero width and still not be invisible. It could still print but then it
would be over-printed by the next character.

The {\tt \\halign to <dimen>} comes next then the {\sl template}.  The
first thing to note about the {\sl template} is that \TeX\ thinks there
are eight columns in the table not just the three that contain the data.
The first column contains  `{\tt \# \\strut}', but no values are
specified to match the `\#' sign so only the `{\tt \\strut} is ever put in
this column, but this does fix the vertical space allowed for the {\sl
\\vrule} segments and for the text.  The initial `{\tt\&}' in the listings
of the row data that follow the {\sl preamble} is all that is necessary to
cause the {\tt \\strut} to apply to the entries in each row.  The four
`{\tt vrule}' segments in each row after the first are similiarly called
into action by the second, fourth, and sixth `{\tt \&}' symbol in
the row specification and by the final {\tt \\cr}.

The first row of data containing `{\tt AT\&T common
Stock}' is an exception to the general rule, in that this caption spans
five columns as signalled by the \cs\/\ `{\tt \\multispan 5}'.
The next row also illustrates  how you {\sl omit} the application of
the formatting rules specified in the {\sl preamble} by using 
`{\tt \\omit}' \cs\/\ and how you prevent the widths of the entries from being
used to determine column width by the `{\tt \\hidewidth}' \css.
Finally, the `{\tt \\rlap}' command is used to overlap the
`*' in one entry so that its width is not considered in aligning this
entry.
{\bf The Fixed-Column-Width `\\settab' Method}

The fixed-column-width {\tt \\settab} method should normally be used only when the fixed
width restriction is of no consequence snd when you want to preserve the
column spacings for several different tables.  It also functions best
where the entries can all be left aligned.  The table on page 4 does not
meet these restrictions but it will reveal most of the complication that
you are apt to encounter. So you type the following, noting the use of the
`{\tt \\+}' \cs\/\ to start each row and the `{\tt \\cr}' \cs\/\ to end it:
 
\vbox{\settabs 1 \columns
\+\$\$\\vbox$\{$\\tt \\settabs 5 \\columns\cr
\+\\+\\\\rm\& \\\\sl\& \\\\it\& \\\\tt\& \\\\bf\\cr\cr
\+\\+\\rm Roman\& \\sl Slanted\& \\it Italic\& \\tt Typewriter\& \\bf Boldface\\cr\cr
\+$\}$\$\$\cr}

You get:

$$\vbox{\tt \settabs 5 \columns
\+\\rm& \\sl& \\it& \\tt& \\bf\cr
\+\rm Roman& \sl Slanted& \it Italic& \tt Typewriter& \bf Boldface\cr
}$$

You can make the columns narrower by calling for an extra unused column
and you can center the text in the columns by introducing `{\tt \\hfill}'
\css\/\ both before and after each entry (using `{\tt \\hfil}' \css\/\
will not work) and by adding an extra `{\tt \&}' symbol after the last
entries (to force \TeX\ to handle the last column like all of the rest).
All of this gets to be more trouble than to use the `{\tt \\halign}'\ 
method but you can then type:

\vbox{\settabs 1 \columns
\+\$\$\\vbox$\{$\\tt \\settabs 6 \\columns\cr
\+\\+\\hfill\\\\rm\\hfill\&\\hfill\\\\sl\\hfill\&%
\\hfill\\\\it\\hfill\&\\hfill\\\\tt\\hfill\&\\hfill\\\\bf\\hfill\&\\cr\cr
\+\\+\\rm\\hfill Roman\\hfill\&\\sl\\hfill Slanted\\hfill\&\\it\\hfill\cr
\+Italic\\hfill\&\\tt\\hfill Typewriter\\hfill\&\\bf\\hfill Boldface\\hfill\&\\cr\cr
\+$\}$\$\$\cr}

to get:

$$\vbox{\tt \settabs 6 \columns
\+\hfill\\rm\hfill&\hfill\\sl\hfill&\hfill\\it\hfill&\hfill\\tt\hfill&\hfill\\bf\hfill&\cr
\+\rm\hfill Roman\hfill&\sl\hfill Slanted\hfill&\it\hfill
Italic\hfill&\tt\hfill Typewriter\hfill&\bf\hfill Boldface\hfill&\cr
}$$


{\bf The Varible-Width-Column `\\settab' Method}

The variable-column-width method line does a somewhat better job.  This
method requires you to supply a sample row for the table, which you type in place
of the `{\tt 5 \\columns}' on the first line (this sample is used for
dimensions only and is not printed). You use the largest entry taken from
each column and you add some desired amount of space between entries.
In this case the sample line will have all of its entries taken from the
second row of the table which is a bit tricky, since these entries are all
in different typefaces.

Here you type:

\vskip 10pt
\vbox{\settabs 1 \columns
\+\$\$\\vbox$\{$\\tt\\settabs\\+\\quad\\rm Roman\&\\quad\\sl Slanted\&\cr
\+\\quad\\it Italic\&\\quad\\tt Typewriter\&\\quad\\bf Boldface\&\\cr\cr
\+\\+\\hfill\\\\rm\\hfill\&\\hfill\\\\sl\\hfill\&%
\\hfill\\\\it\\hfill\&\\hfill\\\\tt\\hfill\&\\hfill\\\\bf\\hfill\&\\cr\cr
\+\\+\\rm\\hfill Roman\\hfill\&\\sl\\hfill Slanted\\hfill\&\\it\\hfill\cr
\+Italic\\hfill\&\\tt\\hfill Typewriter\\hfill\&\\bf\\hfill Boldface\\hfill\&\\cr\cr
\+$\}$\$\$\cr
}

to get:

$$\vbox{\tt \settabs\+\quad\rm Roman&\quad\sl Slanted&
\quad\it Italic&\quad\tt Typewriter&\quad\bf Boldface&\cr
\+\hfill\\rm\hfill&\hfill\\sl\hfill&\hfill\\it\hfill&\hfill\\tt\hfill&\hfill\\bf\hfill&\cr
\+\rm\hfill Roman\hfill&\sl\hfill Slanted\hfill&\it\hfill
Italic\hfill&\tt\hfill Typewriter\hfill&\bf\hfill Boldface\hfill&\cr
}$$

which is similiar to the table on page 4 except for a slight error in centering.


{\bf Typing Mathematical Formulas}

Math formulas are, by tradition, printed using different conventions from
those used for printing ordinary text. Some of these differences may seem
quite trivial but they contribute greatly to the legibility and yes even
to the beauty of well printed mathematical texts.  Fortunately, \TeX\
knows about these math conventions and can usually be trusted to follow
them.

Some of these conventions are:
1) Alphabetic characters are
printed in $math$ $italics$ rather than in a more normal font and
$math$ $italics$ differs in minor detail from normal {\it italics}.  2)
Many special symbols are used that are not available in the normal text mode,
such as Greek letters, conventional
mathematical symbols, such as $\ge$, $\le$, $\ne$, $\approx$, etc. 3) The
spacing conventions are different from those used in ordinary text. In fact,
\TeX\ completely ignores the spaces that you use in typing
formulas and applies its own spacing rules (e.g.,  $x+y$ instead of
$x$ + $y$ or of $x$+$y$). 4) The alignment rules are also quite special as you will
observe in later examples, and many symbols are frequently printed in enlarged forms.
5) Superscripts and subscripts are used
and these are normally automatically reduced in size, such
as in $x↑{a↑b}$ (typed as {\tt \$$\{$x\↑{}a$\}$\↑{}b\$}) or
as in $x_{a_b}$ (typed as {\tt \$$\{$x\_{}a$\}$\_{}b\$}).\quad
6) It is also customary to use a somewhat different style for printing formulas
that appear on separate lines from the style used for within-text formulas.

A {\sl math mode} formula is enclosed within either single dollar signs
`{\tt \$$\ldots$\$}', if the formula is to appear in a line with ordinary
text,
 or within double dollar signs if the formula is to be typed on a
separate line, in so-called {\sl display math mode}, thus `{\tt
\$\$$\ldots$\$\$}'.  

Eight different styles of math typesetting 
are used,
four regular styles and four cramped variations.  The letters and numbers
are typeset in three different sizes, these being 
text size
(\hbox{$x+y-z$}), script size {$\scriptstyle (x+y-z)$}, and scriptscript size
{$\scriptscriptstyle (x+y-z)$}.  If you want to enforce a
size that \TeX\ might not otherwise use, as was just done, you use the
control sequences {\tt~\\scriptstyle} and {\tt~\\scriptscriptstyle}.  The
display style and the text style use the same
size letters and numbers
but differ in the sizes used for {\sl large operators}, 
in the positioning of exponents and in the way they handle fractions.
For example, $x↑2$ in text style appears as $\displaystyle x↑2$~in display style
and as 
\vbox to 0pt{\vss\hbox{$\displaystyle{\atop x↑2}$}\kern0pt}~in the cramped versions
of both text and display styles.  Should you want to enforce the use
of either the text style or the display style,
 you can use the control sequences
{\tt \\textstyle} or {\tt \\displaystyle}. A discussion of how these styles are
used in fractions will be deferred until later.

Symbols classed as {\sl large operators} (including the `summation'
and `integration' signs $\sum$ and $\int$)  are printed in a larger
size when in display math mode from the way they appear in normal math
mode.
If you type {\tt \$\\sum\_{}$\{$n=1$\}$\↑{}m\$} you get $\sum_{n=1}↑m$ and
if you type {\tt \$\\int\_{}$\{$-\\infty$\}$\↑{}$\{$+\\infty$\}$\$}
 you get $\int_{-\infty}↑{+\infty}$.  On the
other hand, these same expressions typed as display formulas yield:
$$\hbox
{{$\displaystyle\sum_{n=1}↑m$} \quad
  and \quad {$\displaystyle\int_{-\infty}↑{+\infty}$}}$$
The  control sequence {\tt \\nolimits} will cause the summation sign to have
subscripts and superscripts just as in the text mode, and the
control sequence {\tt \\limits}, if typed after the \\int will cause
the integration limits to appear above and below the intergal sign thus:
$$\hbox
{{$\displaystyle\sum\nolimits_{n=1}↑m$} \quad
  and \quad {$\displaystyle\int\limits_{-\infty}↑{+\infty}$}}$$

The following example will illustrate the way in which \TeX\ will increase
the size of certain symbols and will make the horizontal lines long enough
to extend over the subformula to which they apply and high enough or low
enough not to bump into it. Typing:
{\tt \$\$\\sqrt$\{$1+\\sqrt$\{$1+\\sqrt$\{$1+%
\\sqrt$\{$1+\\sqrt$\{$1+\\sqrt$\{$1+x$\}\}\}\}\}\}$\$\$} \quad produces:
$$\sqrt{1+\sqrt{1+\sqrt{1+\sqrt{1+\sqrt{1+\sqrt{1+x}}}}}}$$

The \cs\/ `{\tt \\over}' \ is also automatically extendable but
with one important difference.  \TeX\ assumes that
everything within the same sub-formula grouping before the
`{\tt \\over}' \cs\/\ is to go above the
line and everything that follows, again within the same sub-formula grouping, is
to go below the line that `{\tt \\over}' \ generates.
A varient on the {\tt \\over} theme, called
`{\tt \\above}', allows you to specify the weight of the line, thus:
$$\hbox{{\tt \$\$$\{$a\\above1pt 1+b$\}$\$\$} \quad yields\quad}
{a\above1pt1+b}\hbox{ \qquad
and with `{\tt \\above2pt}'\ it yields\quad}{a\above2pt1+b}$$

\TeX\ provides a somewhat similiar extendability with respect to parentheses and
other {\sl delimiters}, this time to extend them vertically as required.
By using the \cs\/ `{\tt \\left}'\ before a left
delimiter and `{\tt \\right}' \ before the corresponding right delimiter,
you can let \TeX\ decide as to the correct size of delimiter to use.  The
`{\tt \\left}' \ and `{\tt \\right}' \ \css\/ have an auxillary function
in that they also act as {\sl grouping} symbols so it is not necessary to
use the `{\tt $\{$}' \ and `{\tt $\}$}' \ symbols with them (unless, of course,
these are the delimiters to be printed, and then they must be typed
as {\tt \\$\{$} and {\tt \\$\}$}).
It {\bf is} necessary to use the {\tt \\left} and {\tt \\right} \css\/\ 
in matching pairs (although the delimiters themselve need not match).

The following example illustrates these features.
$$\hbox{You type \qquad
{\tt \$\$1+\\left(1\\over 1-x{}\↑{}2\\right)\↑{}3\$\$\qquad to get}}\qquad
1+\left(1\over1-x↑2\right)↑3$$
%$$\hbox{You type \qquad
%\$\$1+\\left(1\\over1-x{\caret}2\\right){\caret}3\$\$\qquad to get}\qquad
%1+\left(1\over1-x↑2\right)↑3$$

This example introduced yet another feature, namely the handling of
exponents, which was alluded to briefly once before.
The `{\tt
\↑{}}', is used to indicate a superscript and its companion the `{\tt
\_}', is used to indicate a subscript. Both normally applies only to the
next character so you must use {\sl grouping\/} symbols for those cases
where a multi-character superscript or subscript is to be shown. thus if
you type:
$$\hbox
{{\tt \$\$1+\\left(1\\over 
1-x\↑{}$\{$21$\}$\_3\\right)\↑{}$\{$32$\}$\$\$}\qquad 
you get}\qquad 1+\left(1\over1-x↑{21}↓3\right)↑{32}$$


A series of control sequences for specifying delimiter sizes are available
for use in situations where \TeX\ may not make the desired choice.
For opening delimiters these are, in order of increasing
size:  {\tt \\bigl}, {\tt \\Bigl}, {\tt \\biggl}, and {\tt \\Biggl} and
for closing delimiters they are {\tt \\bigr}, {\tt \\Bigr}, {\tt \\biggr},
and {\tt \\Biggr}. It should be noted that the {\tt \\bigl} and {\tt
\\bigr} delimiters are larger than ordinary ones so that the
difference can be perceived, yet small enough to be used within the text of a
paragraph.  Even larger delimiters than those named can be made by
using the {\tt \\left} and the {\tt \\right} conventions and by adding an
empty {\sl \\vbox} of the appropriate size within the field when
necessary. For example, you can type:
$$\vbox{\halign{#\hfil&#\cr
\$\$\\left(\\vbox to 27pt$\{$$\}$\\left(\\vbox to 24pt$\{$$\}$\\left(\\vbox to 21pt$\{$$\}$\cr
\\Biggl(\\biggl(\\Bigl(\\bigl(($\{$\\scriptstyle($\{$\\scriptscriptstyle(\\hskip3pt\cr
)$\}$)$\}$)\\bigr)\\Bigr)\\biggr)\\Biggr)\\right)\\right)\\right)\cr
\\left[\\vbox to 27pt$\{$$\}$\\left[\\vbox to 24pt$\{$$\}$\\left[\\vbox to 21pt$\{$$\}$\cr
\\Biggl[\\biggl[\\Bigl[\\bigl[[$\{$\\scriptstyle[$\{$\\scriptscriptstyle[\\hskip3pt\cr
]$\}$]$\}$]\\bigr]\\Bigr]\\biggr]\\Biggr]\\right]\\right]\\right]\cr
\\left\\$\{$\\vbox to 27pt$\{$$\}$\\left\\$\{$\\vbox to 24pt$\{$$\}$\\left\\$\{$\\vbox to 21pt$\{$$\}$\cr
\\Biggl\\$\{$\\biggl\\$\{$\\Bigl\\$\{$\\bigl\\$\{$\\$\{$$\{$\\scriptstyle\\$\{$$\{$\\scriptscriptstyle\\$\{$\\hskip3pt\cr
\\$\}$$\}$\\$\}$$\}$\\$\}$\\bigr\\$\}$\\Bigr\\$\}$\\biggr\\$\}$\\Biggr\\$\}$\\right\\$\}$\\right\\$\}$\\right\\$\}$\$\$\cr
}}$$
to get
$$\left(\vbox to 27pt{}\left(\vbox to 24pt{}\left(\vbox to 21pt{}
\Biggl(\biggl(\Bigl(\bigl(({\scriptstyle({\scriptscriptstyle(\hskip3pt
)})})\bigr)\Bigr)\biggr)\Biggr)\right)\right)\right)
\left[\vbox to 27pt{}\left[\vbox to 24pt{}\left[\vbox to 21pt{}
\Biggl[\biggl[\Bigl[\bigl[[{\scriptstyle[{\scriptscriptstyle[\hskip3pt
]}]}]\bigr]\Bigr]\biggr]\Biggr]\right]\right]\right]
\left\{\vbox to 27pt{}\left\{\vbox to 24pt{}\left\{\vbox to 21pt{}
\Biggl\{\biggl\{\Bigl\{\bigl\{\{{\scriptstyle\{{\scriptscriptstyle\{\hskip3pt
\}}\}}\}\bigr\}\Bigr\}\biggr\}\Biggr\}\right\}\right\}\right\}$$


\TeX\ recognizes 16 other basic
delimiters which can be obtained in different sizes, either by using the {\tt
\\left} and {\tt \\right} technique or by specifying their size as
illustrated above for parentheses, brackets, and braces.
There are restrictions as to the sized available for {\tt \\langle}, {\tt
\\rangle}, {\tt /}, and {\tt \\backslash}, but not for the other extendable
delimiters.
$$\vbox{\halign{\hfil$#$\hfil\quad&\tt #\hfil\qquad\quad&
\hfil$#$\hfil\quad&\tt #\hfil\qquad&
\hfil$#$\hfil\quad&\tt #\hfil\qquad\quad&
\hfil$#$\hfil\quad&\tt #\hfil\cr
\noalign{\centerline{Additional extendable delimiters for use in {\sl Display Math} mode}}
\noalign{\vskip3pt}
\hbox{For}&\hbox{You type}&\hbox{For}&\hbox{You type}&
\hbox{For}&\hbox{You type}&\hbox{For}&\hbox{You type}\cr
\noalign{\vskip3pt}
\lfloor&\\lfloor& \langle&\\langle& \vert&\\vert& \downarrow&\\downarrow\cr
\rfloor&\\rfloor& \rangle&\\rangle& \Vert&\\Vert& \Downarrow&\\Downarrow\cr
\lceil&\\lceil& /&/& \uparrow&\\uparrow& \updownarrow&\\updownarrow\cr
\rceil&\\rceil& \\&\\backslash& \Uparrow&\\Uparrow& \Updownarrow&\\Updownarrow\cr
}}$$


Before considering matrices and other uses of large delimiters, let us
dispose of the matter of fractions. It is usually wise to avoid the use of
more than one {\tt \\over} in an equation and when you do have to do so
remember that there cannot be more than one {\tt \\over} in any one
subexpression.  When you do use more than one {\tt \\over},
you probably should introduce our old
friends {\tt \\strut} and {\tt \\Displaystyle} to keep the spacings
and character sizes from shrinking alarmingly. Certainly,

$$a_0+{ a\over\displaystyle a_1+
{\strut 1\over\displaystyle a_2+
{\strut 1\over\displaystyle a_3+
{\strut 1\over\displaystyle a_4+}}}}
\hbox{\quad typed as\quad}\vtop{\tt \halign{#\hfil\cr
\$\$a\_{}0+$\{$ a\\over\\displaystyle a\_{}1+\cr
$\{$\\strut 1\\over\\displaystyle a\_{}2+\cr
$\{$\\strut 1\\over\\displaystyle a\_{}3+\cr
$\{$\\strut 1\\over\\displaystyle a\_{}4+$\}$$\}$$\}$\$\$\cr}}$$
looks better than
$$a_0+{a\over a_1+{ 1\over a_2+{ 1\over a_3+{ 1\over a_4+}}}}$$

which is what you get without {\tt \\strut} and {\tt \\displaystyle}.

As an exercise, you might reproduce this example and make several copies,
one without using \\strut and another without \\displaystyle, to reveal the
exact effect of these refinements.

Perhaps the most common use of large delimiters is in printing matrices,
where the {\tt \\matrix} macro can be used. This macro is similiar in many
respects to the {\tt \\halign} macro that was discussed on page 13 except
that  \\matrix only works in math mode, and no template need be supplied.
To get:
$$A=\left(\matrix{x-\lambda&1&0\cr
 0&x-\lambda&1\cr
 0&0&x-\lambda\cr}\right)
\hbox{\quad you type \quad}\vcenter
{\halign{\tt #\cr
\$\$A=\\left(\\matrix$\{$ x-\\lambda\&1\&0\\cr\cr
0\&x-\\lambda\&1\\cr\cr
0\&0\&x-\\lambda\\cr$\}$\\right)\$\$\cr}}
$$
It helps in typing a matrix such as this if you line up the columns,
which you can do since \TeX\ pays no attention to the spaces that you leave.
So you might type:

\smallskip
{\tt \parskip=0pt\obeylines{\$\$A=\\left|\\matrix$\{$
x-\\lambda \& 1\ \ \ \ \ \ \ \ \  \& 0\ \ \ \ \ \ \ \ \  \\cr
0\ \ \ \ \ \ \ \ \  \& x-\\lambda \& 1\ \ \ \ \ \ \ \ \  \\cr
0\ \ \ \ \ \ \ \ \  \& 0\ \ \ \ \ \ \ \ \  \& x-\\lambda \\cr
$\}$\\right|\$\$}}\qquad This, of course, produces:
$$A=\left|\matrix{x-\lambda&1&0\cr
 0&x-\lambda&1\cr
 0&0&x-\lambda\cr}\right|$$
since I used vertical bars instead of parentheses.
If you are wondering how I was able to preserve the spacings
in showing you what I typed,
I used the plain \TeX's macros, {\tt \\parskip=0pt\\obeylines} \ to start and
then typed `{\tt \\ }' for all desired spaces.

Ellipses (i.e., dots) are used in many places but they appear to good
advantage in matrices where you might type:
$$\vcenter{\openup1\jot
\halign{\tt #\cr
\$\$A=\\pmatrix$\{$\cr
 a\_{}$\{$11$\}$\&a\_{}$\{$12$\}$\&\\ldots\&a\_{}$\{$1n$\}$\\cr\cr
 a\_{}$\{$21$\}$\&a\_{}$\{$22$\}$\&\\ldots\&a\_{}$\{$2n$\}$\\cr\cr
\\vdots\&\\vdots\&\\ddots\&\\vdots\\cr\cr
 a\_{}$\{$m1$\}$\&a\_{}$\{$m2$\}$\&\\ldots\&a\_{}$\{$mn$\}$\\cr$\}$\$\$\cr
\strut\cr
}}
\hbox{\qquad to get\qquad} 
A=\pmatrix{
a_{11}&a_{12}&\ldots&a_{1n}\cr
a_{21}&a_{22}&\ldots&a_{2n}\cr
\vdots&\vdots&\ddots&\vdots\cr
a_{m1}&a_{m2}&\ldots&a_{mn}\cr}$$ \vskip-16pt
If you are wondering how I adjusted matters so that the lines in the
four-line matrix listing lined up with the corresponding lines in the
five-line source
listing, the secret is that I introduced an extra line at the end of the source
listing containing only a \\strut. But this, alone, would not have been enough.
If you are a perfectionist, you may have noted that the two sides of the
matrix example at the top of this page did not quite line up. This was
because matrices are automatically printed (for easy reading) with
the interline spacing increased by 1\\jot (defined as 3pt).
To compensate for this, I introduced {\tt \\openup1\\jot} after
the {\tt \\vcenter} command that caused the left half of the display to be
printed. My troubles were still not over--- the \\strut, which did not
print, did introduce extra space that was eliminated by puting
a {\tt \\vskip-16pt} control sequence after the display.

The {\tt \\ldots} \cs (as in the above matrix) is used between letters
and commas while another \cs\/,
`{\tt \\cdots}', is used between signs and similiar operators as
 in  $a+b+\cdots+z$.
Incidentally, a single centered dot is a {\tt \\cdot}.
  Still another \cs, 
`{\tt \\dots}', is used for ellipses in non-math text\dots,
when needed.

If a left delimiter without a matching right delimiter is needed (or the
reverse), \TeX\ allows you to type `{\tt \\right.}'(or `{\tt \\left.}'),
where the period acts as a null delimiter, terminating the extent of the
grouping effect (or initiating it) without anything being printed.

Single braces are often used in refering to different cases and plain
\TeX\ provides a convenient macro, you guessed it, called {\tt \\cases}.
This bears a remarkable resemblance to {\tt matrix} except that, 1)~only
one delimiter, a brace, is printed, 2)~the entries are left aligned, and
3)~the material that appears after the `{\&}' symbol is not in math mode
unless specifically surrounded with `{\$}' symbols. For example, to get:

$$|x|=\cases{x,&if $x\ge0$;\cr -x,&otherwise.\cr}$$
you type
$$\vbox{\tt
\$\$|x|=\\cases{x,\&if \$x\\ge0\$;\\cr -x,\&otherwise.\\cr}\$\$
}$$

One frequently needs to use roman characters and words within or in
conjunction with mathematical formulas.  In fact, there are three quite different
machanisms that can be used.  When only an ocassional
letter or word is to be used, it is quite sufficient to switch to roman and
type
$$\hbox{{\tt
\$\\exp(x+$\{$\\rm constant$\}$)\$}\quad to get \quad }\exp(x+{\rm constant})$$
This will still work for several words but, since spaces are ignored,
you have to use the control sequence `{\tt \\ }' to preserve the spacings
between words. 

The second way is to use a \\hbox, thus  to get:
$$x↑3+\hbox{lower order terms \quad you type \quad {\tt 
\$x\↑{}3+\\hbox$\{$lower order terms$\}$\$}}$$
This scheme was, in fact used to type this very example and, in fact, it
has been used extensively throughout this manual.  It has two obvious
disadvantages, 1) the current font will be used, and this may not be the
font you want (but this can be fixed) and 2) the content of the box will
always be in the same size unless extra precautions are taken when the
words are wanted in a different size, perhaps for use in a superscript or
subscript.

Finally, if you plan to use a word or a fixed sequence of roman typed words
frequently in different mathematical formulas, for example the sequence just
used, then you can assign a name to it as one of your own macros thus:
$$\hbox{\tt \\def\\loterms$\{$\\hbox$\{$\\rm low order terms$\}\}$.}$$
Thereafter when you want the sequence `low order terms' you simply type
{\tt \\loterms}. The above example would then be typed as \quad
`{\tt \$x\↑{}3+\\loterms\$}'.

Since the names of the common mathematical function are always set in
roman type, the following control sequences have been predefined in plain
\TeX:
$$\vbox{\tt \halign{#\hfil\quad&&#\hfil\quad\cr
\\arccos  &\\cos   &\\csc   &\\exp   &\\ker     &\\limsup  &\\min  &\\sinh\cr
\\arcsin  &\\cosh  &\\deg   &\\gcd   &\\lg      &\\ln      &\\Pr   &\\sup\cr
\\arctan  &\\cot   &\\det   &\\hom   &\\lim     &\\log     &\\sec  &\\tan\cr
\\arg     &\\coth  &\\dim   &\\inf   &\\liminf  &\\max     &\\sin  &\\tanh\cr
}}$$
These control sequences lead to roman type with appropriate spacing.
Certain of these are treated as {\sl large operators} (just like \\sum), to wit:
\\det, \\ged, \\inf,  \\lim, \\liminf, 
\\limsup,  \\max, \\mln, \\Pr, and \\sup.  The following
examples are taken from The \TeX book but rearranged to use the \\cases
control sequence, to demonstrate that {\tt \\cases} will work for a larger 
array that previously shown.
$$\cases{\rm To\ get&You type (while in math mode)\cr 
\noalign{\vskip2pt}
\sin2\theta=2\sin\theta\cos\theta&\tt \\sin2\\theta=2\\sin\\theta\\cos\\theta\cr
\noalign{\vskip2pt}
O(n\log n\log\log n)&\tt O(n\\log n\\log\\log n)\cr
\noalign{\vskip2pt}
\Pr(X>x)=\exp(-x/\mu)&\tt \\Pr(X>x)=\\exp(-x/\\mu)\cr
\noalign{\vskip2pt}
\displaystyle{\max_{1\le n\le m}\log_2P_n}&\tt 
\\displaystyle$\{$\\max\_{}$\{$1\\le n\\le m$\}$\\log\_{}2P\_{}n$\}$\cr
\noalign{\vskip2pt}
\displaystyle{\lim_{x\to0}{\sin x\over x}=1}&\tt 
\\displaystyle$\{$\\lim\_{}$\{$x\\to0$\}\{$\\sin x\\over x$\}$=1$\}$\cr
}$$
Incidentally, I wanted these examples to be spaced a little farther apart
than they would be with the spacing set by \\cases. The solution was to insert
{\tt \\noalign$\{$\\vskip2pt$\}$} after every {\tt \\cr} (except the last one).
I could have used the {\tt \\openup} command as explained on page 23.

Punctuation should be used with caution.  When a formula is followed by
punctuation, such as a period or a comma, put the punctuation after the
terminating \$ sign, when the formula is in text (even in the extreme case
when you type something like {\tt `\$x=a\$,~\$b\$,~or~\$c\$.'}, but put the
punctuation before
the terminating `\$\$', when the formula is displayed.  Note: Punctuation
symbols have been omitted from the display equations used so far in this
manual, (so as not to confuse you), but I will start using them now.

Numbering isolated display formulas poses no special 
problen as plain \TeX\ provides two control sequences, {\tt \\eqno} for numbers
that are to go on the right, and {\tt \\leqno} for numbers that are to go on the 
left. In both cases, these control sequences go after the formula to be numbered.
they act much like our old friend `\&' in that they separate two fields,
everything to the left is part of the formula and
everything to the right up to the
terminating \$\$ will appear as the equation number. Thus,
{\tt \$\$(x+y)(x-y)=x\↑{}2-y\↑{}2.\\eqno(21).\$\$}  will produce:
$$(x+y)(x-y)=x↑2-y↑2.\eqno(21)$$
If you type
{\tt \$\$(x+y)(x-y)=x\↑{}2-y\↑{}2.\\leqno[22].\$\$} \ you will get:
$$(x+y)(x-y)=x↑2-y↑2.\leqno[21a]$$
The formulas are centered in both cases (without
regard for the presence of the formula numbers), and the formula numbers are in
math style unless you specify otherwise.

Several display formulas, appearing together, can be aligned at any desired
location (on an equal sign perhaps) by using the control sequence 
{\tt \\eqalign}', which works with `{\tt \&}' and `{\tt \\cr}'
in a manner somewhat similiar to the use of these markers in {\tt \\matrix} and
{\tt \\cases}. For example, if you type:
\smallskip
{\tt \$\$\\eqalign$\{$ax\↑{}2+bx+c\&=0\\cr
x\&=$\{$-b\\pm\\sqrt$\{$b\↑{}2-4ac$\}$\\over2a$\}$.\\cr$\}$\$\$}
\smallskip
to get
$$\eqalign{ax↑2+bx+c&=0\cr
x&={-b\pm\sqrt{b↑2-4ac}\over2a}.\cr}$$

If you want the equations individually numbered, you use {\tt \\eqalignno}
and add a second `{\tt \&}' with the number added as usual for each
equation that is to be numbered.  It is also possible to introduce extra
text lines between the different formula lines as shown in the following
example.  Typing:
\smallskip {\tt \obeylines \parskip 0pt 
{\$\$\\eqalignno$\{$ax\↑{}2+bx+c\&=0\&(1)\\cr
\\noalign$\{$\\hbox$\{$This is some extra text$\}\}$
x\&=$\{$-b\\pm\\sqrt$\{$b\↑{}2-4ac$\}$\\over2a$\}$.\&(2)\\cr$\}$\$\$}}
\ \ produces
$$\eqalignno{ax↑2+bx+c&=0&(1)\cr
\noalign{\hbox{This is some extra text}}
x&={-b\pm \sqrt {b↑2-4ac}\over 2a}.&(2)\cr }$$

Using {\tt \\eqalign} (not {\tt \\eqalignno}) and adding {\tt \\eqno(3)},
for example, will cause the set of formulas to be
numbered as a group, with the number centered vertically
with respect to the group, producing

$$\eqalign{ax↑2+bx+c&=0\cr
x&={-b\pm\sqrt{b↑2-4ac}\over2a}.\cr}\eqno(3)$$
Finally, using {\tt \\leqno} and {\tt \\leqalignno}, with an `{\tt l}'
and with no other changes,
will cause the formula numbers to be placed at the left.

Some fundamental differences between {\tt \\eqalign} and {\tt \\eqalineno}
should be noted.

\\eqalign makes a single, vertically centered \\vbox that is no wider than
necessary, that cannot be broken between pages,
and that can only take a single vertically-centered equation
number.  More than one \\eqaligns can, however, be put on a line (if space
permits),

\\eqalignno generates a set of full-width lines.  This set of lines can be
broken between pages and the individual lines can take individual line
numbers.  \\eqno cannot be used with \\eqalignno to assign a group
equation number.  Lines of normal text can, however, be placed between the
\\eqalignno equation lines by using the {\tt
\\noalign$\{$\\hbox$\{$\dots$\}\}$} construction.

Long equations pose a difficult problem, particularly if they must still
be aligned in some way with other equations in a group, and you may have
to help \TeX\ to do a satisfactory job.  One solution is illustrated
below.  
$$\eqalignno{x_nu_1+\cdots+x_{n+t-1}u_t
&=x_nu_1+(ax_n+c)u_2+\cdots\cr
&\phantom{=x_nu_1}\;+\bigl(a↑{t-1}x_n+c(a↑{t-2}+\cdots+1)\bigr)u_t\cr
&=(u_1+au_2+\cdots+a↑{t-1}u_t)x_n+h(u_1,\ldots,u_t).  \quad&(47)\cr}$$
The first and third lines were aligned on the $=$ signs as usual but then
we wanted the second line to be aligned with the $+$ sign as shown, and
the \\eqalignno control sequence makes no provision for secondary
alignments.  The solution is to use the control sequence {\tt
\\Phantom$\{\ldots\}$} which causes \TeX\ to leave the same amount of
space that would be taken by the indicated text without printing it.
So we put a {\tt \\phantom$\{$=x\_{}nu\_{}1$\}$} in front of the second
line and align it with the other two lines on the `$=$' sign.  This
does not work perfectly because the \\phantom command creates an empty box
of the size necessary to contain the indicated characters without regard for
their surroundings and the space allowed before the $=$ and $+$ signs depends
on the context.  The net rsult is that
we have to add a bit of space defined by `{\tt \\;}'. So what
we type is:  
$$\vbox{\tt \halign{#\hfill\cr
$$\\eqalignno$\{$x\_{}nu\_{}1+\\cdots+x\_{}$\{$n+t-1$\}$u\_{}t\cr
\&=x\_{}nu\_{}1+(ax\_{}n+c)u\_{}2+\\cdots\\cr\cr
\&\\phantom$\{$=x\_{}nu\_{}1$\}$\\;+\\bigl(a\↑{}$\{$t-1$\}$x\_{}n+c(a\↑{}$\{$t-2$\}$+\\cdots+1)\\bigr)u\_{}t\\cr\cr
\&=(u\_{}1+au\_{}2+\\cdots+a\↑{}$\{$t-1$\}$u\_{}t)x\_{}n+h(u\_{}1,\\ldots,u\_{}t).  \\quad\&(47)\\cr$\}$$$\cr
}}$$

Normally, you can depend on \TeX\ to space things correctly, but when \TeX\ needs
your help while in math mode, you can use the following:
\thinspace
$$\vbox{\halign{\hfil#\hfil\quad&&\hfil#\hfil\quad\cr
You type&\tt \\!&\tt \\,&\tt \\>&\tt \\;\cr
To get&$-1/6$ quad&\ $1/6$ quad&\ $2/9$ quad&$5/18$ quad\cr
}}$$

\goodbreak
{\bf Some Odds and Ends}

\nobreak
You are about ready to undertake ordinary typing on your own but you still
do not know how to produce footnotes,\footnote{*}{Like this, which was
produced by typing `{\tt \\footnote$\{$*$\}\{$Like this, which was produced by
typing
\dots $\}$'} right along following the macro itself.
 \TeX\ will usually do the right thing
like puting the indicated mark (which is typed in the first set of braces)
in the text where the macro \\footnote appears and puting the footnote
itself (which was typed in a second pair of braces) at the bottom of the
same page and even dividing an extra long footnote between pages.}
and how to allow for insertions.

\goodbreak
\newcount\notenumber
\def\clearnotenumber{\notenumber=0}
\def\note{\advance\notenumber by1 \footnote{$↑{\the\notenumber}$}}
\clearnotenumber
If you should like your footnotes to be numbered automatically, even this
can be done by defining a new control sequence which might be called
\\note.\note{I think `foot' would be better} Before the first footnote\note{You can
also number equations automatically (but that's a different story).}
to be so numbered you write (as
I have done):
$$\vbox{\tt \halign{#fil\cr
\\newcount\\notenumber\cr
\\def\\clearnotenumber$\{$\\notenumber=0$\}$\cr
\\def\\note$\{$\\advance\\notenumber by1 \\footnote$\{$\\$↑{}\{$\\the\\notenumber$\}$\$$\}$$\}$\cr
\\clearnotenumber\cr
}}$$

There is an art to inserting illustrations or other independently derived
material into a text.  A number of people are working on supplements to
\TeX\ to allow for the direct introduction of computer derived graphics
into \TeX\ output, but I will assume that you will be content to add
photograph and graphical material manually.

Plain \TeX\ provides for three basic type of insertions, {\tt
\\topinsert}, {\tt \\modinsert}, and {\tt \\pageinsert}. These can only be
given between paragraphs and not inside of boxes or other insertions. The
general form for these is:
{\tt \\topinsert <vertical mode material that can have embedded paragraphs>
\\endinsert.}

\TeX\ tries to put a {\tt \\topinsert} at the top of the current page, if
there is still room when the {\tt \\topinsert} is encountered, otherwise
it will be put at the top of the next page.  If several {\tt \\topinsert}
commands are given close together, some may be carried to still later
pages.  The {\tt \\midinsert} is put on the page in the position where it
appears,
if this is possible, otherwise it is handled as a {\tt \\topinsert}. A {\tt
\\pageinsert} is automatically expanded to fill an entire page and put on
the next page.

Complications requiring human intervention
may arise if \TeX\ is asked to put
topinserts and footnotes on the same page and if both
topinserts and footnote extensions are carried over to a following page.

I will now type a \\topinsert, which, as you can see, appears on the top
of this page. 
\topinsert 
\hsize=4in \raggedright
This was typed in the text at the point indicated.
It will be replaced by some additional info on topinserts.
Some more material, just to fill things up a bit.

\centerline{\bf This is a \\topinsert}\endinsert
What I just typed was;
$$\vbox{\halign{#\hfil\cr
\\topinsert \cr
\\hsize=4in \\raggedright\cr
This was typed in the text at the point indicated.  It will be replaced by\cr
some additional info on topinserts.  Some more material, just to fill\cr
things up a bit.\cr
\cr
\\centerline$\{$\\bf This is a \\\\topinsert$\}$\\endinsert\cr}}$$

If there is any danger of an insertion that does not get made before the end of the
appropriate section, you can force its printing by typing  \\vfill\\supereject.

\def\leaderfill{\leaders\hbox to 1em{\hss.\hss}\hfill}
You should also know how to produce so-called `leaders', such as these,
that are often used in Contents tables.
\smallskip
\nobreak\penalty10000
\line{\qquad\qquad Introduction\leaderfill 1\qquad\qquad}
\line{\qquad\qquad Toward Book Quality\leaderfill 2\qquad\qquad}
\smallskip\goodbreak
which were typed as:
\smallskip\nobreak
$$\vbox{\halign{#\hfill\cr
\\def\\leaderfill$\{$\\leaders\\hbox to 1em$\{$\\hss.\\hss$\}$\\hfill$\}$\cr
\\line$\{$\\qquad\\qquad Introduction\\leaderfill 1\\qquad\\qquad$\}$\cr
\\line$\{$\\qquad\\qquad Toward Book Quality\\leaderfill 2\\qquad\\qquad$\}$\cr
}}$$

\goodbreak

\nopagenumbers % suppress footlines
\headline={
\null\voffset=-2\baselineskip
\ifodd\pageno\rightheadline \else\leftheadline\fi}
\def\rightheadline{\tenrm\hfil A Beginner's \TeX\ Manual\hfil\folio}
\def\leftheadline{\tenrm\folio\hfil First Grade \TeX \hfil}

{\bf Output Routines}

\nobreak
Defining varient forms of output routines is properly in the domain of
the \TeX pert, but you may like to have a choice of at least one other format
which I am now using, starting with this page. This change was introduced by
typing:
\smallskip
$$\vbox{\tt {\halign{#\hfil\cr
\\nopagenumbers \% suppress footlines\cr
\\headline=$\{$\\ifodd\\pageno\\rightheadline \\else\\leftheadline\\fi$\}$\cr
\\def\\rightheadline$\{$\\tenrm\\hfil A Beginner's \\TeX\\ Manual\\hfil\folio$\}$\cr
\\def\\leftheadline$\{$\\tenrm\\folio\\hfil First Grade \\TeX \\hfil$\}$\cr
\\voffset=2\\baselineskip\cr
}}}$$
\smallskip
Of course, if you want to get fancy, you can have \TeX\ automatically use your
current chapter or section headings as running heads, but this may be too much
for the beginner.

{\bf Defining Macros}

The following macros have been defined and used in this manual:

$$\vbox{\halign{#\hfil\cr
\\def\\TeX$\{$T\\kern-.1667em\\lower.5ex\\hbox$\{$E$\}$\\kern-.125em X$\}$\cr
\\def\\loterms$\{$\\hbox$\{$\\rm low order terms$\}\}$\cr
\\def\\clearnotenumber$\{$\\notenumber=0$\}$\cr
\\def\\note$\{$\\advance\\notenumber by1 \\footnote$\{$\\$↑{}\{$\\the\\notenumber$\}$\$$\}$$\}$\cr
\\def\\leaderfill$\{$\\leaders\\hbox to 1em$\{$\\hss.\\hss$\}$\\hfill$\}$\cr
\\def\\rightheadline$\{$\\tenrm\\hfil A Beginner's \\TeX\\ Manual\\hfil\folio$\}$\cr
\\def\\leftheadline$\{$\\tenrm\\folio\\hfil First Grade \\TeX \\hfil$\}$\cr
}}$$

Several features are evident, they all begin with the control sequence
`\\def' followed by the new name and then the meaning to be assigned to
this new name enclosed in braces which are not a part of the definition.
If braces are wanted as a part of the defintion they must be added.

Care must be taken not to duplicate a name that has
already been used for some other still needed operation. If you have any doubts 
about the possible prior use of some name you can interrogate \TeX\ by loading
\TeX82 in the usual way but without a file name and then in response to the
asterisk response type {\tt \\show} followed by the name in question.

For example,
$$\vbox{\halign{#\hfil\quad&#\hfil\quad&#\hfil\quad&#\hfil\cr
typing&{\tt \\show\\zzzz}& yields&{\tt \\zzzz=undefined}\cr
typing&{\tt \\show\\hfil}& yields&{\tt \\hfil=\\hfil}\cr
while &{\tt \\show\\footnot}& yields&{\tt \\footnote=macro:}\cr}}$$
plus some other information as to its exact meaning.

****THIS SECTION IS INCOMPLETE****

\vfill\eject
\centerline{Appendices not yet written}
\vfill\eject
%This is the title page, put last so as to permit the nopagenumbers command
\vfill
\eject
\nopagenumbers
\null\vskip-46pt
\hbox to 6.5truein {Stanford Department of Computer Science\hfil August 2, 1983}
\vskip .1in
\line {Report No. STAN-CS-83-***\hfil(Version 0.1)}
\vfill
\centerline{\bf First Grade \TEX}
\vskip .1in
\centerline{\bf A Beginner's \TEX\ Manual}
\vskip .25in
\centerline{by}
\centerline{Arthur L. Samuel}
\vfill
\centerline{\seal S}
\vfill
{\baselineskip 9pt
This manual is based on the publications of Donald~E.~Knuth who
originated
the \TEX\ system and on the recent work of Professor Knuth and
his many students and
collaborators who have helped bring the \TEX82 system to its present
advanced state of development. The \TEX\ logo that is used in
this manual is a trademark of The American Mathematical
Society.}

\eject

\end

\beginchapter Appendix B. Basic\\Control\\Sequences

Let's begin this appendix with a chart that summarizes plain \TeX's
↑↑{summary of plain TeX} ↑↑|\+| ↑↑{tabbing} ↑↑{accents}
conventions.

\def\sep{\medskip\hrule width\hsize\medskip}
\medskip\smallskip
\hrule height .61803pt
\kern 1pt
\hrule
\medskip
\line{\strut Characters that are reserved for special purposes:\hfil
  |\|\hfil|{|\hfil|}|\hfil|$|\hfil|&|\hfil|#|\hfil|%|\hfil|↑|\hfil|_|\hfil|~|}
\sep
\halign to\hsize{\strut\hfil#\hfil\tabskip\z@ plus10pt&
\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil\tabskip\z@skip\cr
|\rm roman,|&|{\sl slanted},|&|{\bf boldface},|&|{\it italic\/} type|\cr
roman,&{\sl slanted},&{\bf boldface},&{\it italic\/} type\cr}
\sep
\halign to\hsize{\strut\hfil#\hfil\tabskip\z@ plus10pt&
\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil\tabskip\z@skip\cr
|``|&|''|&|--|&|---|&|?||`|&|!||`|&|\$|&|\#|&|\&|&|\%|&
  |\ae|&|\AE|&|\oe|&|\OE|&|\aa|&|\AA|&|\ss|&|\o|&|\O|\cr
``&''&--&---&?`&!`&\$&\#&\&&\%&\ae&\AE&\oe&\OE&\aa&\AA&\ss&\o&\O\cr}
\sep
\halign to\hsize{\strut\hfil#\hfil\tabskip\z@ plus10pt&
\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil\tabskip\z@skip\cr
|\`a|&|\'e|&|\↑o|&|\"u|&|\=y|&|\~n|&|\.p|&|\u\i|&
  |\v s|&|\H\j|&|\t\i u|&|\b k|&|\c c|&|\d h|\cr
\`a&\'e&\↑o&\"u&\=y&\~n&\.p&\u\i&\v s&\H\j&\t\i u&\b k&\c c&\d h\cr}
\sep
\halign to\hsize{\strut\hfil#\hfil\tabskip\z@ plus10pt&
\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&\hfil#\hfil&
\hfil#\hfil\tabskip\z@skip\cr
|\l|&|\L|&|\dag|&|\ddag|&|\S|&|\P|&|{\it\$|&
  |\&}|&|\copyright|&|\TeX|&|\dots|\cr
\l&\L&\dag&\ddag&\S&\P&\phantom{\tt////}\it\$&
  \it\&\phantom{\tt/}&\copyright&\TeX&\dots\cr}
\sep
\line{\strut Line break controls:\hfil
  |\break|\hfil|\nobreak|\hfil|\allowbreak|\hfil|\hbox{unbreakable}|}
\line{\strut|dis\-cre\-tion\-ary hy\-phens|\hfil|virgule\slash breakpoint|}
\sep
\settabs 2\columns
\+\strut Breakable horizontal spaces:& Unbreakable horizontal spaces:\cr
\+|\|\] \ normal interword space& |~| \ normal interword space\cr
\+|\enskip| \ this\enskip much& |\enspace     | \ this\enspace much\cr
\+|\quad  | \ this\quad much&   |\thinspace   | \ this\thinspace much\cr
\+|\qquad | \ this\qquad much&  |\negthinspace| \ this\negthinspace much\cr
\+\strut|\hskip| \<arbitrary dimen>& |\kern| \<arbitrary dimen>\cr
\sep
\smallskip
\+\strut Vertical spaces:\hfill
  |\smallskip| $\vcenter{\hrule width2em\smallskip\hrule}$\hfill&
  |\medskip| $\vcenter{\hrule width3em\medskip\hrule}$\hfill
  |\bigskip| $\vcenter{\hrule width4em\bigskip\hrule}$&\cr
\smallskip
\sep
\line{\strut Page break controls:\hfil|\eject|\hfil|\supereject|\hfil
  |\nobreak|\hfil|\goodbreak|\hfil|\filbreak|}
\+\strut Vertical spaces and good breakpoints:&
  |\smallbreak|\hfill|\medbreak|\hfill|\bigbreak|&\cr
\sep
\settabs 4 \columns
\hbox{\strut|\settabs 4 \columns|}
\hbox{|\+Here's an example&of\hfill some &tabbing:&\hrulefill&\cr|}
\+Here's an example&of\hfill some &tabbing:&\hrulefill&\cr
\+\hfill|\hrulefill |&\hrulefill&\hfill|\dotfill |&\dotfill&\cr
\+\hfill|\leftarrowfill |&\leftarrowfill&
  \hfill|\rightarrowfill |&\rightarrowfill&\cr
\+\hfill|\upbracefill |&\upbracefill&
  \hfill|\downbracefill |&\downbracefill&\cr
\smallskip
\line{\strut More general alignments use |\halign|, |\valign|, |\omit|,
  |\span|, and |\multispan|.}
\sep
\line{\strut Examples of the principal conventions for text layout
  appear on the next page.}
\sep\unskip
\kern 1pt
\hrule height .61803pt
\eject